Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHTTPProbes ¶
RegisterHTTPProbes adds the probe api to the given router
Types ¶
type Condition ¶
type Condition struct { Ready bool `json:"ready"` Message string `json:"message,omitempty"` Name string `json:"name"` }
Condition contains the information regarding the status of a piece of the System
type ConditionCheck ¶
type ConditionCheck func() Condition
ConditionCheck defines the API for functions that check the condition of the system
type Conditions ¶
type Conditions struct {
// contains filtered or unexported fields
}
Conditions holds the health and readiness conditions and verifies if they have been met
func NewConditions ¶
func NewConditions(app info.App, instance info.Instance) *Conditions
NewConditions creates a Conditions object, for which to register health and readiness conditions
func (*Conditions) IsAlive ¶
func (c *Conditions) IsAlive() (bool, interface{})
IsAlive checks whether the health conditions are met
func (*Conditions) IsReady ¶
func (c *Conditions) IsReady() (bool, interface{})
IsReady checks whether the ready conditions are met
func (*Conditions) RegisterHealthCondition ¶
func (c *Conditions) RegisterHealthCondition(condition ConditionCheck)
RegisterHealthCondition adds a condition that must pass in order for the health probe to respond with 200
func (*Conditions) RegisterReadynessCondition ¶
func (c *Conditions) RegisterReadynessCondition(condition ConditionCheck)
RegisterReadynessCondition adds a condition that must pass in order for the readiness probe to respond with 200