watcher

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultClusterStatePollInterval is the default interval for polling cluster state changes
	DefaultClusterStatePollInterval = 30 * time.Second
	// DefaultClusterStateDebounceWindow is the default debounce window for cluster state changes
	DefaultClusterStateDebounceWindow = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterState

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

ClusterState monitors cluster state changes and triggers debounced reloads

func NewClusterState

func NewClusterState(discoveryClient discovery.CachedDiscoveryInterface) *ClusterState

func (*ClusterState) Close

func (w *ClusterState) Close()

Close stops the cluster state watcher

func (*ClusterState) Watch

func (w *ClusterState) Watch(onChange func() error)

Watch starts a background watcher that periodically polls for cluster state changes and triggers a debounced reload when changes are detected. It can only be called once per ClusterState instance.

type Kubeconfig

type Kubeconfig struct {
	clientcmd.ClientConfig
	// contains filtered or unexported fields
}

func NewKubeconfig

func NewKubeconfig(clientConfig clientcmd.ClientConfig) *Kubeconfig

func (*Kubeconfig) Close

func (w *Kubeconfig) Close()

func (*Kubeconfig) Watch

func (w *Kubeconfig) Watch(onChange func() error)

type Watcher

type Watcher interface {
	Watch(onChange func() error)
	Close()
}

Jump to

Keyboard shortcuts

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