Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handlers = []string{
"acl",
"any",
"as112",
"chaos",
"cookie",
"dbfile",
"dbhost",
"dbsqlite",
"drunk",
"geoip",
"log",
"metrics",
"msgcache",
"nsid",
"refuse",
"sign",
"template",
"unpack",
"url",
"whoami",
"yes",
}
Handlers is a slices of handler names.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller is used by handlers to parse their config.
func NewTestController ¶
func NewTestController(input string) *Controller
NewTestController create a controller useful for tests.
func (*Controller) OnReset ¶ added in v0.5.15
func (c *Controller) OnReset(fn func())
func (*Controller) OnShutdown ¶
func (c *Controller) OnShutdown(fn func() error)
func (*Controller) OnStartup ¶
func (c *Controller) OnStartup(fn func() error)
OnStartup and OnShutdown can be used by handlers to register startup and shutdown functions. Each function is execute once during starting and shutting of the server. OnReset is called after OnShutdown to clear anything out that can prevent a clean reload, think sync.Once mutexes.
func (*Controller) Path ¶ added in v0.5.1
func (c *Controller) Path() string
func (*Controller) RemainingPaths ¶ added in v0.5.1
func (c *Controller) RemainingPaths() []string
Click to show internal directories.
Click to hide internal directories.