healthcheck

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(httpClient *http.Client) gates.GateFactory

Factory is a function for creating per-reconciliation gates for the HealthCheckGate.

Types

type HealthCheckGate

type HealthCheckGate struct {
	Logger     logr.Logger
	HTTPClient *http.Client
}

HealthCheckGate checks an HTTP endpoint and is open if the gate returns a 200 response.

Any other response, is closed.

func New

func New(l logr.Logger, httpClient *http.Client) *HealthCheckGate

New creates and returns a new HealthCheck gate.

func (HealthCheckGate) Check

Check returns true if the URL returns a 200 response.

func (HealthCheckGate) Interval

Interval returns the time after which to requeue this check.

Jump to

Keyboard shortcuts

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