health

package
v0.4.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package health handles health checking for the webhook

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHealthCheckers

func RegisterHealthCheckers(router *mux.Router, checkers ...healthz.HealthChecker)

RegisterHealthCheckers adds the healthz endpoint to the webhook.

Types

type ErrorChecker

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

ErrorChecker is a HealthChecker that returns the last stored error.

func NewErrorChecker

func NewErrorChecker(name string) *ErrorChecker

NewErrorChecker returns a new error checker initialized with a "not ready" error

func (*ErrorChecker) Check

func (e *ErrorChecker) Check(_ *http.Request) error

Check returns the last error stored.

func (*ErrorChecker) Name

func (e *ErrorChecker) Name() string

Name returns the Name of the checker.

func (*ErrorChecker) Store

func (e *ErrorChecker) Store(err error)

Store the given error as the last seen error

Jump to

Keyboard shortcuts

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