prober

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check func() bool

type Prober

type Prober struct {
	// contains filtered or unexported fields
}

Prober represents health and readiness status of given component.

func New

func New(logger log.Logger) *Prober

New returns Prober representing readiness and healthiness of given component.

func (*Prober) Healthy

func (p *Prober) Healthy()

Healthy sets components status to healthy.

func (*Prober) HealthyHandler

func (p *Prober) HealthyHandler() http.HandlerFunc

HealthyHandler returns a HTTP Handler which responds health checks.

func (*Prober) NotHealthy

func (p *Prober) NotHealthy(err error)

NotHealthy sets components status to not healthy with given error as a cause.

func (*Prober) NotReady

func (p *Prober) NotReady(err error)

NotReady sets components status to not ready with given error as a cause.

func (*Prober) Ready

func (p *Prober) Ready()

Ready sets components status to ready.

func (*Prober) ReadyHandler

func (p *Prober) ReadyHandler() http.HandlerFunc

ReadyHandler returns a HTTP Handler which responds readiness checks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL