Documentation ¶
Index ¶
- Constants
- type Config
- type Reporter
- func (r *Reporter) Recover(next http.Handler) http.Handler
- func (r *Reporter) Run(_ context.Context) error
- func (r *Reporter) SetLiveness(_ context.Context, b bool)
- func (r *Reporter) SetReadiness(_ context.Context, b bool)
- func (r *Reporter) Stop(ctx context.Context) error
- func (r *Reporter) UpdateHealthChecks(_ context.Context, m map[string]*healthpb.Check)
Constants ¶
View Source
const ( LivenessAffirmativeResponseCode = http.StatusOK LivenessNegativeResponseCode = http.StatusServiceUnavailable ReadinessAffirmativeResponseCode = http.StatusOK ReadinessNegativeResponseCode = http.StatusServiceUnavailable )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `envconfig:"HEALTH_HTTP_REPORTER_ADDR" default:"0.0.0.0"` Port int `envconfig:"HEALTH_HTTP_REPORTER_PORT" default:"8181"` LivenessRoute string `envconfig:"HEALTH_HTTP_REPORTER_LIVENESS_ROUTE" default:"/live"` ReadinessRoute string `envconfig:"HEALTH_HTTP_REPORTER_READINESS_ROUTE" default:"/ready"` Logger health.Logger }
Click to show internal directories.
Click to hide internal directories.