k8s

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapWatcher

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

func New

func New(namespace, name string) (*ConfigMapWatcher, error)

func (*ConfigMapWatcher) Get

func (*ConfigMapWatcher) StartWatching

func (w *ConfigMapWatcher) StartWatching(ctx context.Context, dst chan<- v1.ConfigMap) error

StartWatching pushes instances of the identified configuration map found in a target Kuberentes cluster.

type TypedEventHandler

type TypedEventHandler[T any] struct {
	AddFunc    func(T)
	UpdateFunc func(T, T)
	DeleteFunc func(T)
}

func (TypedEventHandler[T]) OnAdd

func (t TypedEventHandler[T]) OnAdd(obj interface{}, isInInitialList bool)

OnAdd calls AddFunc if it's not nil.

func (TypedEventHandler[T]) OnDelete

func (t TypedEventHandler[T]) OnDelete(obj interface{})

OnDelete calls DeleteFunc if it's not nil.

func (TypedEventHandler[T]) OnUpdate

func (t TypedEventHandler[T]) OnUpdate(oldObj, newObj interface{})

OnUpdate calls UpdateFunc if it's not nil.

Jump to

Keyboard shortcuts

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