Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶
type HealthCheck struct {
// contains filtered or unexported fields
}
HealthCheck provides an HTTP endpoint that returns the health status of the service
func New ¶
func New(state Status, options ...Option) *HealthCheck
New creates a HealthCheck with the specified initial state.
func (*HealthCheck) Get ¶
func (hc *HealthCheck) Get() Status
Get the current status of this health check
func (*HealthCheck) Ready ¶
func (hc *HealthCheck) Ready()
Ready is a shortcut for Set(Ready) (kept for backwards compatibility)
func (*HealthCheck) Serve ¶
func (hc *HealthCheck) Serve(port int) (*HealthCheck, error)
Serve starts HTTP server on the specified port.
type Option ¶
type Option func(*HealthCheck)
Option is a functional option for passing parameters to New()
Click to show internal directories.
Click to hide internal directories.