healthchecker

package
v0.16.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Privileged = true
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WatcherConfig      *watcher.Config
	EndpointNamespace  string
	ClusterID          string
	PingInterval       uint
	MaxPacketLossCount uint
	NewPinger          func(PingerConfig) PingerInterface
}

type ConnectionStatus

type ConnectionStatus string
const (
	Connected         ConnectionStatus = "connected"
	ConnectionUnknown ConnectionStatus = "unknown"
	ConnectionError   ConnectionStatus = "error"
)

type Interface

type Interface interface {
	Start(stopCh <-chan struct{}) error
	GetLatencyInfo(endpoint *submarinerv1.EndpointSpec) *LatencyInfo
}

func New

func New(config *Config) (Interface, error)

type LatencyInfo

type LatencyInfo struct {
	ConnectionError  string
	ConnectionStatus ConnectionStatus
	Spec             *submarinerv1.LatencyRTTSpec
}

type PingerConfig added in v0.12.0

type PingerConfig struct {
	IP                 string
	Interval           time.Duration
	Timeout            time.Duration
	MaxPacketLossCount uint
}

type PingerInterface

type PingerInterface interface {
	Start()
	Stop()
	GetLatencyInfo() *LatencyInfo
	GetIP() string
}

func NewPinger added in v0.12.0

func NewPinger(config PingerConfig) PingerInterface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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