health

package
v0.0.0-...-c0e25a9 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check func(addr *url.URL) error

type Opts

type Opts func(*ProxyHealth)

func WithCheck

func WithCheck(check Check) Opts

WithCheck sets the health check function for the proxy.

func WithInitialDelaySeconds

func WithInitialDelaySeconds(initialDelaySeconds int) Opts

WithInitialDelaySeconds sets the initial delay for the health check.

func WithPeriodSeconds

func WithPeriodSeconds(periodSeconds int) Opts

WithPeriodSeconds sets the period for the health check.

type ProxyHealth

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

func New

func New(origin *url.URL, opts ...Opts) *ProxyHealth

func (*ProxyHealth) IsAvailable

func (h *ProxyHealth) IsAvailable() bool

IsAvailable returns whether the proxy origin was successfully connected at the last check time.

Jump to

Keyboard shortcuts

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