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 ¶
UnnamedHealthChecker is an unnamed healthz checker. The name of the check can be set by the controller manager.