Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶ added in v1.1.0
type HealthCheck struct {
// contains filtered or unexported fields
}
HealthCheck provides an HTTP endpoint that returns the health status of the service
func New ¶ added in v1.1.0
func New() *HealthCheck
New creates a HealthCheck with the specified initial state.
func (*HealthCheck) Get ¶ added in v1.1.0
func (hc *HealthCheck) Get() Status
Get the current status of this health check
func (*HealthCheck) Handler ¶ added in v1.12.0
func (hc *HealthCheck) Handler() http.Handler
Handler creates a new HTTP handler.
func (*HealthCheck) Ready ¶ added in v1.1.0
func (hc *HealthCheck) Ready()
Ready is a shortcut for Set(Ready) (kept for backwards compatibility)
func (*HealthCheck) Set ¶ added in v1.1.0
func (hc *HealthCheck) Set(status Status)
Set a new health check status
func (*HealthCheck) SetLogger ¶ added in v1.12.0
func (hc *HealthCheck) SetLogger(logger *zap.Logger)
SetLogger initializes a logger.
Click to show internal directories.
Click to hide internal directories.