watch

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterEvent

type ClusterEvent struct {
	Type        ClusterEventType
	ClusterName string
}

type ClusterEventType

type ClusterEventType string
const (
	ClusterEventAddon   ClusterEventType = "addon"
	ClusterEventRemoved ClusterEventType = "removed"
)

type MultiClusterInformers

type MultiClusterInformers struct {
	sync.Map
	// contains filtered or unexported fields
}

func NewMultiClusterInformers

func NewMultiClusterInformers(kubeconfig *rest.Config) *MultiClusterInformers

func (*MultiClusterInformers) ClusterClients

func (w *MultiClusterInformers) ClusterClients(clusterName string) (*klient.ClusterClients, error)

func (*MultiClusterInformers) ClusterEvent

func (w *MultiClusterInformers) ClusterEvent(eventType ClusterEventType, cluster *cluster.Cluster)

func (*MultiClusterInformers) Pods

func (w *MultiClusterInformers) Pods(ns string, matchLabels map[string]string) ([]*corev1.Pod, error)

func (*MultiClusterInformers) SetupPodsEventHandler

func (w *MultiClusterInformers) SetupPodsEventHandler(h cache.ResourceEventHandler)

func (*MultiClusterInformers) SetupStockClusterFetcher

func (w *MultiClusterInformers) SetupStockClusterFetcher(fetchStockCluster func(ctx context.Context) []*cluster.Cluster)

func (*MultiClusterInformers) Start

func (w *MultiClusterInformers) Start(ctx context.Context)

type Watcher

type Watcher struct {
	*MultiClusterInformers
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(kcs *klient.LocalClients, mci *MultiClusterInformers) (*Watcher, error)

func (*Watcher) SetupApplicationsEventHandler

func (w *Watcher) SetupApplicationsEventHandler(h cache.ResourceEventHandler)

func (*Watcher) SetupImagesEventHandler

func (w *Watcher) SetupImagesEventHandler(h cache.ResourceEventHandler)

func (*Watcher) SetupPodsEventHandler

func (w *Watcher) SetupPodsEventHandler(h cache.ResourceEventHandler)

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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