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)