Versions in this module Expand all Collapse all v0 v0.11.0 Nov 16, 2018 Changes in this version + var AppName string + var AppVersion string + var DefaultConfigFile = "Caddyfile" + var GracefulTimeout time.Duration + var OnProcessExit []func() + var PidFile string + var Quiet bool + func AssetsPath() string + func DescribePlugins() string + func EmitEvent(event EventName, info interface{}) + func HasListenerWithAddress(addr string) bool + func IsInternal(addr string) bool + func IsLoopback(addr string) bool + func IsUpgrade() bool + func ListPlugins() map[string][]string + func RegisterCaddyfileLoader(name string, loader Loader) + func RegisterEventHook(name string, hook EventHook) + func RegisterParsingCallback(serverType, afterDir string, callback ParsingCallback) + func RegisterPlugin(name string, plugin Plugin) + func RegisterServerType(typeName string, srv ServerType) + func SetDefaultCaddyfileLoader(name string, loader Loader) + func SplitCommandAndArgs(command string) (cmd string, args []string, err error) + func Started() bool + func Stop() error + func TrapSignals() + func Upgrade() error + func ValidDirectives(serverType string) []string + func ValidateAndExecuteDirectives(cdyfile Input, inst *Instance, justValidate bool) error + type AfterStartup interface + OnStartupComplete func() + type CaddyfileInput struct + Contents []byte + Filepath string + ServerTypeName string + func (c CaddyfileInput) Body() []byte + func (c CaddyfileInput) Path() string + func (c CaddyfileInput) ServerType() string + type Context interface + InspectServerBlocks func(string, []caddyfile.ServerBlock) ([]caddyfile.ServerBlock, error) + MakeServers func() ([]Server, error) + type Controller struct + Key string + OncePerServerBlock func(f func() error) error + ServerBlockIndex int + ServerBlockKeyIndex int + ServerBlockKeys []string + ServerBlockStorage interface{} + func NewTestController(serverType, input string) *Controller + func (c *Controller) Context() Context + func (c *Controller) Get(key interface{}) interface{} + func (c *Controller) OnFinalShutdown(fn func() error) + func (c *Controller) OnFirstStartup(fn func() error) + func (c *Controller) OnRestart(fn func() error) + func (c *Controller) OnShutdown(fn func() error) + func (c *Controller) OnStartup(fn func() error) + func (c *Controller) ServerType() string + func (c *Controller) Set(key, val interface{}) + type CtxKey string + type EventHook func(eventType EventName, eventInfo interface{}) error + type EventName string + const CertRenewEvent + const InstanceStartupEvent + const ShutdownEvent + const StartupEvent + type GracefulServer interface + Address func() string + type Input interface + Body func() []byte + Path func() string + ServerType func() string + func CaddyfileFromPipe(f *os.File, serverType string) (Input, error) + func DefaultInput(serverType string) Input + func LoadCaddyfile(serverType string) (Input, error) + type Instance struct + Storage map[interface{}]interface{} + StorageMu sync.RWMutex + func Instances() []*Instance + func Start(cdyfile Input) (*Instance, error) + func (i *Instance) Caddyfile() Input + func (i *Instance) Restart(newCaddyfile Input) (*Instance, error) + func (i *Instance) SaveServer(s Server, ln net.Listener) + func (i *Instance) Servers() []ServerListener + func (i *Instance) ShutdownCallbacks() []error + func (i *Instance) Stop() error + func (i *Instance) Wait() + type Listener interface + File func() (*os.File, error) + type Loader interface + Load func(serverType string) (Input, error) + type LoaderFunc func(serverType string) (Input, error) + func (lf LoaderFunc) Load(serverType string) (Input, error) + type PacketConn interface + File func() (*os.File, error) + type ParsingCallback func(Context) error + type Plugin struct + Action SetupFunc + ServerType string + type Server interface + type ServerListener struct + func (s ServerListener) Addr() net.Addr + func (s ServerListener) LocalAddr() net.Addr + type ServerType struct + DefaultInput func() Input + Directives func() []string + NewContext func(inst *Instance) Context + type SetupFunc func(c *Controller) error + func DirectiveAction(serverType, dir string) (SetupFunc, error) + type Stopper interface + Stop func() error + type TCPServer interface + Listen func() (net.Listener, error) + Serve func(net.Listener) error + type UDPServer interface + ListenPacket func() (net.PacketConn, error) + ServePacket func(net.PacketConn) error