healthz

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHealthChecker

func RegisterHealthChecker(name string, fn CheckFn)

RegisterHealthChecker registers the given health checker function

func Setup

func Setup(mux *xhttp.ServeMux)

Setup prepares the given HTTP request multiplexer for serving healthz.

Types

type CheckFn

type CheckFn func() (status Status, details error)

type Status

type Status int

Status describes the health of a component or the whole.

const (
	// just an example, we need to figure out what/if granularity makes any sense
	Healthy Status = iota
	Degraded
	NonFunctional
)

Jump to

Keyboard shortcuts

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