controller-managerk8s.io/controller-manager/pkg/healthz Index | Files

package healthz

import "k8s.io/controller-manager/pkg/healthz"

Index

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.

Source Files

handler.go healthz.go

Version
v0.23.1
Published
Dec 16, 2021
Platform
js/wasm
Imports
4 packages
Last checked
1 hour ago

Tools for package owners.