- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ObjectHandler (0.1 sec)
-
architecture/networking/controllers.md
Construction should create informers (via `kclient.New`), setup a queue (via `controllers.NewQueue`), and register event handlers on the informers. Often, these handlers are adding something to the queue like `client.AddEventHandler(controllers.ObjectHandler(queue.AddObject))`. Construction should NOT actually start running all of these things, do I/O, or block in anyway. Running the controller actually starts processing things. Normally, this just means running the queue.
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Feb 09 17:41:25 UTC 2024 - 4.9K bytes - Viewed (0) -
cni/pkg/repair/repaircontroller.go
FieldSelector: strings.Join(fieldSelectors, ","), }) c.queue = controllers.NewQueue("repair pods", controllers.WithReconciler(c.Reconcile), controllers.WithMaxAttempts(5)) c.pods.AddEventHandler(controllers.ObjectHandler(c.queue.AddObject)) return c, nil } func (c *Controller) Run(stop <-chan struct{}) { kube.WaitForCacheSync("repair controller", stop, c.pods.HasSynced) c.queue.Run(stop) c.pods.ShutdownHandlers() }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Feb 10 00:31:55 UTC 2024 - 10.4K bytes - Viewed (0)