MCPcopy Index your code
hub / github.com/kubernetes/sample-controller / enqueueFoo

Method enqueueFoo

controller.go:331–338  ·  view source on GitHub ↗

enqueueFoo takes a Foo resource and converts it into a namespace/name string which is then put onto the work queue. This method should *not* be passed resources of any type other than Foo.

(obj interface{})

Source from the content-addressed store, hash-verified

329// string which is then put onto the work queue. This method should *not* be
330// passed resources of any type other than Foo.
331func (c *Controller) enqueueFoo(obj interface{}) {
332 if objectRef, err := cache.ObjectToName(obj); err != nil {
333 utilruntime.HandleError(err)
334 return
335 } else {
336 c.workqueue.Add(objectRef)
337 }
338}
339
340// handleObject will take any resource implementing metav1.Object and attempt
341// to find the Foo resource that 'owns' it. It does this by looking at the

Callers 2

NewControllerFunction · 0.95
handleObjectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected