dynamic

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Informer

type Informer[L any] interface {
	Informer() SharedIndexInformer
	Lister() L
}

func NewDynamicInformer

func NewDynamicInformer[L any](informer StaticInformer[L]) Informer[L]

NewDynamicInformer returns a shared informer that allows adding and removing event handlers dynamically.

type SharedIndexInformer

type SharedIndexInformer interface {
	// AddDynamicEventHandler adds a dynamic event handler to the informer. It's
	// like AddEventHandler, but the handler is removed when the context closes.
	// handlerName must be unique for each handler.
	AddDynamicEventHandler(ctx context.Context, handlerName string, handler cache.ResourceEventHandler)

	// AddEventHandler shadows the method in the embedded SharedIndexInformer. But it
	// will panic and should not be called.
	AddEventHandler(handler cache.ResourceEventHandler)

	cache.SharedIndexInformer
}

type StaticInformer

type StaticInformer[L any] interface {
	Informer() cache.SharedIndexInformer
	Lister() L
}

Jump to

Keyboard shortcuts

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