Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckInfo ¶
type CheckInfo struct { Name string Level plan.CheckLevel Status CheckStatus Failures int Threshold int LastError string ErrorDetails string }
CheckInfo provides status information about a single check.
type CheckManager ¶
type CheckManager struct {
// contains filtered or unexported fields
}
CheckManager starts and manages the health checks.
func (*CheckManager) Checks ¶
func (m *CheckManager) Checks() ([]*CheckInfo, error)
Checks returns the list of currently-configured checks and their status, ordered by name.
func (*CheckManager) NotifyCheckFailed ¶
func (m *CheckManager) NotifyCheckFailed(f FailureFunc)
NotifyCheckFailed adds f to the list of functions that are called whenever a check hits its failure threshold.
func (*CheckManager) PlanChanged ¶
func (m *CheckManager) PlanChanged(p *plan.Plan)
PlanChanged handles updates to the plan (server configuration), stopping the previous checks and starting the new ones as required.
type CheckStatus ¶
type CheckStatus string
const ( CheckStatusUp CheckStatus = "up" CheckStatusDown CheckStatus = "down" )
type FailureFunc ¶
type FailureFunc func(name string)
FailureFunc is the type of function called when a failure action is triggered.
Click to show internal directories.
Click to hide internal directories.