Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSettings = Settings{ InitialDelay: 200 * time.Millisecond, Period: time.Second, Timeout: 500 * time.Millisecond, }
DefaultSettings provides some default health check settings
Functions ¶
Types ¶
type Check ¶
Check runs the health check under given context.
Healthcheck is considered successful when func returns no error. Func should terminate when context is canceled.
type State ¶
State provides proper locking around health state
func (*State) AsProto ¶
func (state *State) AsProto() *proto.ServiceHealth
AsProto returns protobuf-ready health state
func (*State) Subscribe ¶
func (state *State) Subscribe(ch chan<- StateChange)
Subscribe for the notifications on state changes
func (*State) Unsubscribe ¶
func (state *State) Unsubscribe(ch chan<- StateChange)
Unsubscribe from state changes
type StateChange ¶
StateChange is used to notify about status changes
Click to show internal directories.
Click to hide internal directories.