internal

package
v0.15.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

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

EventHandler adapts a handler.EventHandler interface to a cache.ResourceEventHandler interface.

func NewEventHandler

func NewEventHandler(ctx context.Context, queue workqueue.RateLimitingInterface, handler handler.EventHandler, predicates []predicate.Predicate) *EventHandler

NewEventHandler creates a new EventHandler.

func (*EventHandler) HandlerFuncs

func (e *EventHandler) HandlerFuncs() cache.ResourceEventHandlerFuncs

HandlerFuncs converts EventHandler to a ResourceEventHandlerFuncs TODO: switch to ResourceEventHandlerDetailedFuncs with client-go 1.27

func (*EventHandler) OnAdd

func (e *EventHandler) OnAdd(obj interface{})

OnAdd creates CreateEvent and calls Create on EventHandler.

func (*EventHandler) OnDelete

func (e *EventHandler) OnDelete(obj interface{})

OnDelete creates DeleteEvent and calls Delete on EventHandler.

func (*EventHandler) OnUpdate

func (e *EventHandler) OnUpdate(oldObj, newObj interface{})

OnUpdate creates UpdateEvent and calls Update on EventHandler.

type Kind

type Kind struct {
	// Type is the type of object to watch.  e.g. &v1.Pod{}
	Type client.Object

	// Cache used to watch APIs
	Cache cache.Cache
	// contains filtered or unexported fields
}

Kind is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create).

func (*Kind) Start

Start is internal and should be called only by the Controller to register an EventHandler with the Informer to enqueue reconcile.Requests.

func (*Kind) String

func (ks *Kind) String() string

func (*Kind) WaitForSync

func (ks *Kind) WaitForSync(ctx context.Context) error

WaitForSync implements SyncingSource to allow controllers to wait with starting workers until the cache is synced.

Jump to

Keyboard shortcuts

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