healthz

package
v0.0.0-...-34c5bf1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCheck

func RegisterCheck(name string, check HealthCheck)

RegisterCheck adds a new check to the global register. If a check with the given name already exists, the function will panic.

func Status

func Status(ctx context.Context) map[string]error

Status runs all of the currently registered health checks and returns a map of the results.

Types

type HealthCheck

type HealthCheck func(ctx context.Context) error

HealthCheck is a function that returns an error if a component is unhealthy. The application's overall health depends on the set of registered HealthChecks returning nil errors.

Jump to

Keyboard shortcuts

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