ctrlruntime

package
v1.36.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	controller.Controller

	// WatchObject creates a watch for the specific object, using the cache stored internal to the Controller.
	WatchObject(object client.Object, eventhandler handler.EventHandler, predicates ...predicate.Predicate) error
}

Controller implements and extends the controller.Controller interface. Implementations should store the cache from the manager the controller is made from so the WatchObject function can be implemented.

This adaptation of the controller.Controller interface is needed mainly because we follow a slightly different flow from the standard operator flow, where we add watches after the controller has been created (watches for objects that rely on the API Server that's created by the operator).

The controller.Controller interface now requires using a cache to set up the watches, while the ctrl.Builder interface is tailored to creating watches before the manager / controller has been started.

func NewController

func NewController(name string, mgr manager.Manager, options controller.Options) (Controller, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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