discoverer

package
v0.0.0-...-3e6ee68 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Client        *kubernetes.Clientset
	Namespace     string
	LabelSelector string
}

type Discoverer

type Discoverer interface {
	// RegionDataChan returns channel streaming data regarding updates of set of instances.
	RegionDataChan() <-chan RegionData
	// InstanceStatuses returns channel streaming data regarding updates of statuses on instances.
	// Useful for checking health of the worker.
	InstanceStatuses() <-chan WorkerInstanceStatus

	Run(ctx context.Context) error
}

func New

func New(deps Deps) Discoverer

type RegionData

type RegionData struct {
	RegionId  db.RegionId
	Instances []WorkerInstance
}

type WorkerInstance

type WorkerInstance struct {
	Ip string
}

type WorkerInstanceStatus

type WorkerInstanceStatus struct {
	Status   v1.PodPhase
	Ip       string
	RegionId int
}

func (*WorkerInstanceStatus) IsRunning

func (w *WorkerInstanceStatus) IsRunning() bool

Jump to

Keyboard shortcuts

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