Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
Addr string
// contains filtered or unexported fields
}
Server exposes administrative endpoints.
func New ¶
func New(addr, token string, cfg *config.Config, data []byte, apply func(config.Config) error, stop func(), path string) *Server
New returns a new admin server.
addr specifies the address the server listens on. cfg provides the initial configuration served at /config; it may be nil. data is the raw form of cfg used when computing the initial ETag. apply is invoked with a new configuration when /load is called. stop is called when /stop is requested. path specifies where to persist configuration updates; if empty, updates are not written to disk.
Click to show internal directories.
Click to hide internal directories.