healthchecks

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 18 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheckProvider

type HealthCheckProvider interface {
	CreateHTTPHealthCheck(hc *compute.HttpHealthCheck) error
	UpdateHTTPHealthCheck(hc *compute.HttpHealthCheck) error
	DeleteHTTPHealthCheck(name string) error
	GetHTTPHealthCheck(name string) (*compute.HttpHealthCheck, error)

	CreateAlphaHealthCheck(hc *computealpha.HealthCheck) error
	CreateBetaHealthCheck(hc *computebeta.HealthCheck) error
	CreateHealthCheck(hc *compute.HealthCheck) error
	UpdateAlphaHealthCheck(hc *computealpha.HealthCheck) error
	UpdateBetaHealthCheck(hc *computebeta.HealthCheck) error
	UpdateHealthCheck(hc *compute.HealthCheck) error
	DeleteHealthCheck(name string) error
	GetAlphaHealthCheck(name string) (*computealpha.HealthCheck, error)
	GetBetaHealthCheck(name string) (*computebeta.HealthCheck, error)
	GetHealthCheck(name string) (*compute.HealthCheck, error)
}

HealthCheckProvider is an interface to manage a single GCE health check. TODO: (shance) convert this to use composite types

type HealthChecker

type HealthChecker interface {
	// SyncServicePort syncs the healthcheck associated with the given
	// ServicePort and Pod Probe definition.
	//
	// `probe` can be nil if no probe exists.
	SyncServicePort(sp *utils.ServicePort, probe *v1.Probe) (string, error)
	Delete(name string, scope meta.KeyType) error
	Get(name string, version meta.Version, scope meta.KeyType) (*translator.HealthCheck, error)
}

HealthChecker is an interface to manage cloud HTTPHealthChecks.

type HealthChecks

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

HealthChecks manages health checks.

func NewHealthChecker

func NewHealthChecker(cloud HealthCheckProvider, healthCheckPath string, defaultBackendSvc types.NamespacedName) *HealthChecks

NewHealthChecker creates a new health checker. cloud: the cloud object implementing SingleHealthCheck. defaultHealthCheckPath: is the HTTP path to use for health checks.

func (*HealthChecks) Delete

func (h *HealthChecks) Delete(name string, scope meta.KeyType) error

Delete deletes the health check by port.

func (*HealthChecks) Get

func (h *HealthChecks) Get(name string, version meta.Version, scope meta.KeyType) (*translator.HealthCheck, error)

Get returns the health check by port

func (*HealthChecks) SyncServicePort added in v1.9.0

func (h *HealthChecks) SyncServicePort(sp *utils.ServicePort, probe *v1.Probe) (string, error)

SyncServicePort implements HealthChecker.

Jump to

Keyboard shortcuts

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