watcher

package
v1.33.17 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapCallback

type ConfigMapCallback interface {
	OnChange(configMap *v1.ConfigMap)
}

ConfigMapCallback represents a callback

type ConfigMapEntryCallback

type ConfigMapEntryCallback struct {
	Name     string
	Key      string
	Callback func(string)
	// contains filtered or unexported fields
}

ConfigMapEntryCallback invokes a callback if the value changes

func (*ConfigMapEntryCallback) OnChange

func (cb *ConfigMapEntryCallback) OnChange(configMap *v1.ConfigMap)

OnChange invokes the callback function if the value is not empty and changes

type ConfigMapWatcher

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

ConfigMapWatcher callbacks for changes to a config map

func NewConfigMapWatcher

func NewConfigMapWatcher(kubeClient kubernetes.Interface, ns string, callbacks []ConfigMapCallback, stopCh <-chan struct{}) (*ConfigMapWatcher, error)

NewConfigMapWatcher creates a new watcher of ConfigMap resources which lists them all synchronously then asynchronously processes watch events

func SetupConfigMapWatchers added in v0.0.699

func SetupConfigMapWatchers(ns string, configAgent *config.Agent, pluginAgent *plugins.ConfigAgent) (*ConfigMapWatcher, error)

SetupConfigMapWatchers takes a config agent and plugin agent, each potentially nil, and sets up the appropriate watchers for them.

func (*ConfigMapWatcher) IsStopped

func (w *ConfigMapWatcher) IsStopped() bool

IsStopped checks if configmap watcher is stopped

func (*ConfigMapWatcher) Stop

func (w *ConfigMapWatcher) Stop()

Stop stops the configmap watcher

Jump to

Keyboard shortcuts

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