Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCheck ¶ added in v0.0.10
func RegisterCheck(name string, check SubsystemCheck)
RegisterCheck allows an interested subsystem to register a check that will be called when health status is requested.
func SetParentLogger ¶ added in v0.3.4
func SetParentLogger(l hclog.Logger)
SetParentLogger sets the parent logger for this instance.
Types ¶
type SubsystemCheck ¶ added in v0.0.10
type SubsystemCheck func() SubsystemStatus
A SubsystemCheck is a function that is supplied by a particular subsystem of the server which then provides informatino about that subsystem during a status poll.
type SubsystemStatus ¶ added in v0.0.10
SubsystemStatus contains the information needed to be returned by callback checks to determine worthyness to serve.
func (SubsystemStatus) Proto ¶ added in v0.3.0
func (s SubsystemStatus) Proto() *pb.SubSystemStatus
Proto returns the proto version of the subsystem status.
func (SubsystemStatus) String ¶ added in v0.0.10
func (s SubsystemStatus) String() string
String provides the string representation of the SubsystemStatus
type SystemStatus ¶ added in v0.0.10
type SystemStatus struct { OK bool FirstFailure SubsystemStatus Subsystems []SubsystemStatus }
A SystemStatus is returned containing the status of the entire server, and in the event of a failure will have the FirstFailure encountered called out.
func Check ¶ added in v0.0.10
func Check() SystemStatus
Check runs all the health checks and returns the aggregate status to the caller.
func (SystemStatus) Proto ¶ added in v0.3.0
func (s SystemStatus) Proto() *pb.ServerStatus
Proto returns the complete system status
func (SystemStatus) String ¶ added in v0.0.10
func (s SystemStatus) String() string
String provides the string representation of the SystemStatus