MCPcopy
hub / github.com/kubernetes/client-go / ResourceEventHandlerFuncs

Struct ResourceEventHandlerFuncs

tools/cache/controller.go:186–190  ·  view source on GitHub ↗

ResourceEventHandlerFuncs is an adaptor to let you easily specify as many or as few of the notification functions as you want while still implementing ResourceEventHandler.

Source from the content-addressed store, hash-verified

184// as few of the notification functions as you want while still implementing
185// ResourceEventHandler.
186type ResourceEventHandlerFuncs struct {
187 AddFunc func(obj interface{})
188 UpdateFunc func(oldObj, newObj interface{})
189 DeleteFunc func(obj interface{})
190}
191
192// OnAdd calls AddFunc if it's not nil.
193func (r ResourceEventHandlerFuncs) OnAdd(obj interface{}) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected