Documentation
¶
Index ¶
- type Prober
- func (p *Prober) HandleIfReady(f http.HandlerFunc) http.HandlerFunc
- func (p *Prober) IsHealthy() error
- func (p *Prober) IsReady() error
- func (p *Prober) RegisterInMux(mux *http.ServeMux)
- func (p *Prober) RegisterInRouter(router *route.Router)
- func (p *Prober) SetHealthy()
- func (p *Prober) SetNotHealthy(err error)
- func (p *Prober) SetNotReady(err error)
- func (p *Prober) SetReady()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prober ¶
type Prober struct {
// contains filtered or unexported fields
}
Prober represents health and readiness status of given component.
func NewProber ¶
func NewProber(component component.Component, logger log.Logger, reg prometheus.Registerer) *Prober
NewProber returns Prober representing readiness and healthiness of given component.
func (*Prober) HandleIfReady ¶
func (p *Prober) HandleIfReady(f http.HandlerFunc) http.HandlerFunc
HandleIfReady if probe is ready calls the function otherwise returns 503.
func (*Prober) RegisterInMux ¶
RegisterInMux registers readiness and liveness probes to mux.
func (*Prober) RegisterInRouter ¶
RegisterInRouter registers readiness and liveness probes to router.
func (*Prober) SetHealthy ¶
func (p *Prober) SetHealthy()
SetHealthy sets components status to healthy.
func (*Prober) SetNotHealthy ¶
SetNotHealthy sets components status to not healthy with given error as a cause.
func (*Prober) SetNotReady ¶
SetNotReady sets components status to not ready with given error as a cause.
Click to show internal directories.
Click to hide internal directories.