health

package
v0.14.36 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

Checker checks the health of a local experiment instance.

func NewChecker

func NewChecker(pp *PortProbe, ec *EndpointClient) *Checker

NewChecker creates a new Checker.

func NewCheckerK8S

func NewCheckerK8S(pp *PortProbe, k8s *KubernetesClient, ec *EndpointClient) *Checker

NewCheckerK8S creates a new Checker for Kubernetes deployments.

func (*Checker) GetHealth

func (hc *Checker) GetHealth(ctx context.Context) float64

GetHealth combines a set of health checks into a single score.

type EndpointClient added in v0.14.27

type EndpointClient struct {
	http.Client
}

EndpointClient is an http client to check the local /health endpoint.

func NewEndpointClient added in v0.14.27

func NewEndpointClient(timeout time.Duration) *EndpointClient

NewEndpointClient returns a new *EndpointClient with the specified request timeout.

type KubernetesClient

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

KubernetesClient manages requests to the Kubernetes API server.

func MustNewKubernetesClient

func MustNewKubernetesClient(url *url.URL, pod, node, namespace, auth string) *KubernetesClient

MustNewKubernetesClient creates a new KubenernetesClient instance. If the client cannot be instantiated, the function will exit.

type PortProbe

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

PortProbe checks whether a set of ports are open.

func NewPortProbe

func NewPortProbe(services map[string][]string) *PortProbe

NewPortProbe creates a new PortProbe.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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