Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶ added in v1.2.0
type HealthCheck struct {
// contains filtered or unexported fields
}
HealthCheck has methods for readiness and liveness probes
func NewHealthCheck ¶ added in v1.2.0
func NewHealthCheck(db Pinger) *HealthCheck
NewHealthCheck creates new HealthCheck
func (*HealthCheck) Liveness ¶ added in v1.2.0
func (hc *HealthCheck) Liveness(w http.ResponseWriter, _ *http.Request)
Liveness determines whether service is up
func (*HealthCheck) Readiness ¶ added in v1.2.0
func (hc *HealthCheck) Readiness(w http.ResponseWriter, r *http.Request)
Readiness determines whether service is ready
func (*HealthCheck) SetReady ¶ added in v1.2.0
func (hc *HealthCheck) SetReady(ready bool)
SetReady marks whether service accepts traffic. Set it after listeners are bound and clear it on shutdown