prober

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthOption

type HealthOption struct {
	Address          string
	SuccessThreshold uint
	FailureThreshold uint
	Timeout          time.Duration
	Period           time.Duration
	InitialCondition bool
}

type Manager

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

func NewManager

func NewManager(ctx context.Context, handler updateCondition) *Manager

func (*Manager) AddWorker

func (m *Manager) AddWorker(uid string, option HealthOption)

func (*Manager) GetWorker

func (m *Manager) GetWorker(uid string) (*Worker, bool)

func (*Manager) ListWorkers

func (m *Manager) ListWorkers() map[string]*Worker

func (*Manager) RemoveWorker

func (m *Manager) RemoveWorker(uid string)

type Prober

type Prober interface {
	Probe(address string, timeout time.Duration) error
}

type Worker

type Worker struct {
	Period time.Duration
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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