Documentation ¶
Index ¶
Constants ¶
View Source
const ( LivenessEndpoint = statusRoot + "/liveness" ReadinessEndpoint = statusRoot + "/readiness" HealthEndpoint = statusRoot + "/health" )
Variables ¶
View Source
var HealthStateStatusCodes = map[health.HealthState]int{ health.HealthStateHealthy: http.StatusOK, health.HealthStateUnknown: 500, health.HealthStateDeferring: 518, health.HealthStateSuspended: 519, health.HealthStateRepairing: 520, health.HealthStateWarning: 521, health.HealthStateError: 522, health.HealthStateTerminal: 523, }
Functions ¶
func NewHealthCheckHandler ¶
func NewHealthCheckHandler(checkSource HealthCheckSource, sharedSecret refreshable.String) http.Handler
Types ¶
type HealthCheckSource ¶
type HealthCheckSource interface {
HealthStatus(ctx context.Context) health.HealthStatus
}
HealthCheckSource provides the SLS health status that should be sent as a response. Refer to the SLS specification for more information.
func NewCombinedHealthCheckSource ¶
func NewCombinedHealthCheckSource(healthCheckSources ...HealthCheckSource) HealthCheckSource
Click to show internal directories.
Click to hide internal directories.