healthz

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package healthz provides HTTP healthz handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(name string, errFn func(string), checks ...HealthChecker) http.Handler

Handler returns an HTTP check handler.

Types

type HealthChecker

type HealthChecker interface {
	Name() string
	Check(*http.Request) error
}

HealthChecker represents a named health checker.

var PingHealth HealthChecker = ping{}

PingHealth returns true when called.

func NamedCheck

func NamedCheck(name string, check func(*http.Request) error) HealthChecker

NamedCheck returns a named health check.

Jump to

Keyboard shortcuts

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