Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkable ¶
type Checkable interface { // Checkables should return nil if ready, or an error message otherwise. Ready() error // Checkables should return nil if healthy, or an error message otherwise. Healthy() error }
Types requiring health checks should implement the Checkable interface.
type Checker ¶
type Checker interface { // Register a service for health checks. Register(name string, service Checkable) error // Unregister a service. Unregister(name string) error // IsReady returns the current readiness of the system. // A system is considered ready if all checks are passing (no errors) IsReady() (ready bool, errors map[string]error) // IsHealthy returns the current health of the system. // A system is considered healthy if all checks are passing (no errors) IsHealthy() (healthy bool, errors map[string]error) Start() error Close() error }
Checker provides a service which can be probed for system health.
func NewChecker ¶
func NewChecker() Checker
Click to show internal directories.
Click to hide internal directories.