Documentation ¶
Overview ¶
Package healthz is modified from k8s.io/controller-manager/pkg/healthz to permit removing healthchecks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MutableHealthzHandler ¶
type MutableHealthzHandler struct {
// contains filtered or unexported fields
}
MutableHealthzHandler returns a http.Handler that handles "/healthz" following the standard healthz mechanism.
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.
If multiple health checks are added with the same name, only the last one will be stored.
func (*MutableHealthzHandler) RemoveHealthChecker ¶
func (h *MutableHealthzHandler) RemoveHealthChecker(names ...string)
RemoveHealthChecker removes health check(s) from the handler by name.
Every time this function is called, the handler have to be re-initiated. It is advised to remove as many checks at once as possible.
func (*MutableHealthzHandler) ServeHTTP ¶
func (h *MutableHealthzHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)