Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
NewHandler returns the health HTTP handler with /livez, /readyz, and /healthz endpoints.
Types ¶
type Input ¶
type Input struct {
Role Role
RedisHealthy bool
AMQPHealthy bool
SchedulerHealthy bool
GitHubClientUsable bool
ConsumerHealthy bool
ExporterHealthy bool
GitHubHealthy bool
AdditionalComponents map[string]bool
}
Input represents dependency states used for health evaluation.
type Mode ¶
type Mode string
Mode indicates high-level health mode.
const ( // ModeHealthy indicates all required dependencies are healthy. ModeHealthy Mode = "healthy" // ModeDegraded indicates the app is running but a non-readiness dependency is degraded. ModeDegraded Mode = "degraded" // ModeUnhealthy indicates a required dependency is unhealthy. ModeUnhealthy Mode = "unhealthy" )
type Status ¶
type Status struct {
Role Role `json:"role"`
Mode Mode `json:"mode"`
Ready bool `json:"ready"`
Components map[string]bool `json:"components"`
}
Status represents evaluated application health.
type StatusEvaluator ¶
type StatusEvaluator struct{}
StatusEvaluator evaluates role-aware health and readiness.
func NewStatusEvaluator ¶
func NewStatusEvaluator() *StatusEvaluator
NewStatusEvaluator creates a health evaluator.
func (*StatusEvaluator) Evaluate ¶
func (e *StatusEvaluator) Evaluate(input Input) Status
Evaluate evaluates readiness and mode from dependency state.
Click to show internal directories.
Click to hide internal directories.