healthz

package
v0.0.0-...-8540621 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallPathHandler

func InstallPathHandler(mux mux, path string, checks ...Checker)

InstallPathHandler registers the healtz checks under path. This function can only be called once per mux/path combo.

func RegisterDefaultChecks

func RegisterDefaultChecks(mux mux, checks ...Checker)

RegisterDefaultChecks register the default checks along with the passed in checks.

func RegisterPingEndpoint

func RegisterPingEndpoint(mux mux)

RegisterPingEndpoint registers the ping endpoint to a serve mux.

Types

type Checker

type Checker interface {
	Name() string
	Check() error
}

Checker is a named healthz checker.

var PingHealthz Checker = ping{}

PingHealthz returns true automatically when checked.

func NamedCheck

func NamedCheck(name string, check func() error) Checker

NamedCheck returns a healthz checker for the given name and function.

Jump to

Keyboard shortcuts

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