Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusUndefined = iota StatusPassing StatusWarning StatusCritical )
Service statuses
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckInfo ¶
type CheckInfo struct { Interval string `json:"interval,omitempty"` Timeout string `json:"timeout,omitempty"` HTTP string `json:"http,omitempty"` TCP string `json:"tcp,omitempty"` }
CheckInfo of service state
type Discovery ¶
type Discovery interface { // Register new service Register(options Options) error // Unregister servece by ID Unregister(id string) error // Lookup services by filter Lookup(filter *Filter) ([]*Service, error) }
Discovery service
type Options ¶
type Options struct { ID string `json:"id"` Name string `json:"name"` Address string `json:"address"` Tags []string `json:"tags,omitempty"` Check CheckInfo `json:"check,omitempty"` }
Options of service
Click to show internal directories.
Click to hide internal directories.