Documentation
¶
Index ¶
Constants ¶
View Source
const ( TargetImportanceLow = TargetImportance("low") TargetImportanceHigh = TargetImportance("high") )
View Source
const ( HealthTargetStatusOk = HealthTargetStatus("ok") HealthTargetStatusFail = HealthTargetStatus("fail") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckFunc ¶
type HealthCheckResult ¶
type HealthCheckResult struct { Target HealthTarget `json:"target"` Status HealthTargetStatus `json:"status"` ErrorMessage string `json:"error,omitempty"` // contains filtered or unexported fields }
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func NewHealthChecker ¶
func NewHealthChecker() *HealthChecker
func (*HealthChecker) Check ¶
func (c *HealthChecker) Check(ctx context.Context) ([]HealthCheckResult, error)
func (*HealthChecker) Handler ¶
func (c *HealthChecker) Handler() http.HandlerFunc
func (*HealthChecker) WithTarget ¶
func (c *HealthChecker) WithTarget(name string, importance TargetImportance, check HealthCheckFunc) *HealthChecker
type HealthTarget ¶
type HealthTarget struct { Name string `json:"name"` Importance TargetImportance `json:"importance"` // contains filtered or unexported fields }
type HealthTargetStatus ¶
type HealthTargetStatus string
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func (*Page) Handler ¶
func (p *Page) Handler() http.HandlerFunc
func (*Page) WithHealthChecker ¶
func (p *Page) WithHealthChecker(hc *HealthChecker)
type TargetImportance ¶
type TargetImportance string
Click to show internal directories.
Click to hide internal directories.