healthcheck

package
v0.24.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 4 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() error

Check is a basic health check func.

type Checker

type Checker interface {
	// AddLiveness adds a check that indicates that this instance of the
	// application should be destroyed or restarted. Every liveness check
	// is also included as a readiness check.
	AddLiveness(name string, check Check)

	// AddReadiness adds a check that indicates that this instance of the
	// application is currently unable to serve requests because of an upstream
	// or some transient failure.
	AddReadiness(name string, check Check)

	// LivenessHandler is the HTTP handler for just the /live endpoint.
	LivenessHandler(w http.ResponseWriter, r *http.Request)

	// ReadinessHandler is the HTTP handler for just the /ready endpoint.
	ReadinessHandler(w http.ResponseWriter, r *http.Request)
}

Checker is a basic health checker.

func NewChecker

func NewChecker() Checker

NewChecker creates a new basic health checker.

Jump to

Keyboard shortcuts

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