prober

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 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
}

func (*HealthOption) Equal added in v0.4.1

func (ho *HealthOption) Equal(h HealthOption) 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, address string, option HealthOption) error

func (*Manager) GetWorkerHealthOptionMap added in v0.4.1

func (m *Manager) GetWorkerHealthOptionMap(uid string) (map[string]HealthOption, error)

func (*Manager) RemoveWorker

func (m *Manager) RemoveWorker(uid, address string) (int, error)

func (*Manager) RemoveWorkersByUid added in v0.4.1

func (m *Manager) RemoveWorkersByUid(uid string) (int, error)

type Prober

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

type Worker

type Worker struct {
	HealthOption
	// contains filtered or unexported fields
}

type WorkerMap added in v0.4.1

type WorkerMap map[string]*Worker

Jump to

Keyboard shortcuts

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