discovery

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8S

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

func NewK8S

func NewK8S() (*K8S, error)

func (*K8S) Start

func (k8s *K8S) Start()

func (*K8S) Stop

func (k8s *K8S) Stop()

func (*K8S) Subscribe

func (k8s *K8S) Subscribe(l PodEventsListener)

type Pod

type Pod struct {
	// update Pod.Equal when adding fields
	Id          PodId
	Phase       corev1.PodPhase
	IP          string
	Annotations map[string]string
	Ports       []int
}

func (*Pod) Equal

func (p *Pod) Equal(other *Pod) bool

func (*Pod) Running

func (p *Pod) Running() bool

func (*Pod) ServiceName

func (p *Pod) ServiceName() string

type PodEvent

type PodEvent struct {
	Type PodEventType
	Curr *Pod
	Prev *Pod
}

type PodEventType

type PodEventType int
const (
	PodEventTypeAdd PodEventType = iota
	PodEventTypeChange
	PodEventTypeDelete
)

type PodEventsListener

type PodEventsListener interface {
	ListenPodEvents(events <-chan PodEvent)
}

type PodId

type PodId struct {
	Namespace string
	Name      string
	NodeName  string
}

Jump to

Keyboard shortcuts

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