healthz

package
v0.29.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamedHealthChecker

func NamedHealthChecker(name string, check UnnamedHealthChecker) healthz.HealthChecker

NamedHealthChecker creates a named health check from an unnamed one.

func NamedPingChecker

func NamedPingChecker(name string) healthz.HealthChecker

NamedPingChecker returns a health check with given name that returns no error when checked.

Types

type MutableHealthzHandler

type MutableHealthzHandler struct {
	// contains filtered or unexported fields
}

MutableHealthzHandler returns a http.Handler that handles "/healthz" following the standard healthz mechanism.

This handler can register health checks after its creation, which is originally not allowed with standard healthz handler.

func NewMutableHealthzHandler

func NewMutableHealthzHandler(checks ...healthz.HealthChecker) *MutableHealthzHandler

func (*MutableHealthzHandler) AddHealthChecker

func (h *MutableHealthzHandler) AddHealthChecker(checks ...healthz.HealthChecker)

AddHealthChecker adds health check(s) to the handler.

Every time this function is called, the handler have to be re-initiated. It is advised to add as many checks at once as possible.

func (*MutableHealthzHandler) ServeHTTP

func (h *MutableHealthzHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type UnnamedHealthChecker

type UnnamedHealthChecker interface {
	Check(req *http.Request) error
}

UnnamedHealthChecker is an unnamed healthz checker. The name of the check can be set by the controller manager.

Jump to

Keyboard shortcuts

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