healthcheck

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendConfig added in v1.7.0

type BackendConfig struct {
	Options
	// contains filtered or unexported fields
}

BackendConfig HealthCheck configuration for a backend

func NewBackendConfig added in v1.7.0

func NewBackendConfig(options Options, backendName string) *BackendConfig

NewBackendConfig Instantiate a new BackendConfig

type BalancerHandler added in v1.7.0

type BalancerHandler interface {
	ServeHTTP(w http.ResponseWriter, req *http.Request)
	Servers() []*url.URL
	RemoveServer(u *url.URL) error
	UpsertServer(u *url.URL, options ...roundrobin.ServerOption) error
}

BalancerHandler includes functionality for load-balancing management.

type HealthCheck

type HealthCheck struct {
	Backends map[string]*BackendConfig
	// contains filtered or unexported fields
}

HealthCheck struct

func GetHealthCheck

func GetHealthCheck(metrics metricsRegistry) *HealthCheck

GetHealthCheck returns the health check which is guaranteed to be a singleton.

func (*HealthCheck) SetBackendsConfiguration

func (hc *HealthCheck) SetBackendsConfiguration(parentCtx context.Context, backends map[string]*BackendConfig)

SetBackendsConfiguration set backends configuration

type Options added in v1.3.0

type Options struct {
	Headers   map[string]string
	Hostname  string
	Scheme    string
	Path      string
	Port      int
	Transport http.RoundTripper
	Interval  time.Duration
	LB        BalancerHandler
}

Options are the public health check options.

func (Options) String added in v1.3.0

func (opt Options) String() string

Jump to

Keyboard shortcuts

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