Versions in this module Expand all Collapse all v0 v0.1.1 Mar 2, 2023 v0.1.0 Mar 1, 2023 Changes in this version + var DefaultReadynessCheckTimeout = 10 * time.Second + var ErrPingCheckFailed = errors.New("ping check failed") + var ErrURLCheckFailed = errors.New("URL check failed") + var InfoPath = "/infoz" + var LivePath = "/livez" + var ReadyPath = "/readyz" + type Check interface + Check func(context.Context) error + func CheckHTTPResponse(method, url string, client *http.Client) Check + func CheckPing(pinger Pinger) Check + func CheckURL(url string) Check + type CheckFunc func(context.Context) error + func (f CheckFunc) Check(ctx context.Context) error + type ErrorLogger func(err error) + type Handler struct + ErrorLogger ErrorLogger + ReadynessTimeout time.Duration + func New(opts ...Option) *Handler + func (h *Handler) AddCheck(c Check) + func (h *Handler) AddCheckFunc(c CheckFunc) + func (h *Handler) EnableInfo(infoData map[string]any) + func (h *Handler) ExecuteReadyChecks(ctx context.Context) error + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Option func(*Handler) + func WithErrorLogger(l ErrorLogger) Option + func WithReadynessTimeout(t time.Duration) Option + type Pinger interface + PingContext func(context.Context) error