watcher

package module
v0.0.0-...-60709c1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigWatcher

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

ConfigWatcher watches for ConfigMap changes containing TN slice configurations

func NewConfigWatcher

func NewConfigWatcher(kubeClient kubernetes.Interface, namespace, nodeName string) *ConfigWatcher

NewConfigWatcher creates a new configuration watcher

func (*ConfigWatcher) FilterByNode

func (w *ConfigWatcher) FilterByNode(configMaps []*corev1.ConfigMap) []*corev1.ConfigMap

FilterByNode filters ConfigMaps by node label

func (*ConfigWatcher) GetConfigurations

func (w *ConfigWatcher) GetConfigurations(ctx context.Context) (map[string]string, error)

GetConfigurations retrieves all configurations for this node

func (*ConfigWatcher) ProcessEvent

func (w *ConfigWatcher) ProcessEvent(event watch.Event)

ProcessEvent processes watch events manually (for testing)

func (*ConfigWatcher) Start

func (w *ConfigWatcher) Start(ctx context.Context, ch chan<- *corev1.ConfigMap) error

Start starts watching ConfigMap changes with Kubernetes informers

func (*ConfigWatcher) Stop

func (w *ConfigWatcher) Stop()

Stop stops the watcher (informer stops when context is cancelled)

func (*ConfigWatcher) WatchConfigurations

func (w *ConfigWatcher) WatchConfigurations(ctx context.Context) (<-chan *corev1.ConfigMap, error)

WatchConfigurations watches for configuration changes

Jump to

Keyboard shortcuts

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