MCPcopy Index your code
hub / github.com/kubernetes/client-go / OnAdd

Method OnAdd

tools/cache/controller.go:223–228  ·  view source on GitHub ↗

OnAdd calls the nested handler only if the filter succeeds

(obj interface{})

Source from the content-addressed store, hash-verified

221
222// OnAdd calls the nested handler only if the filter succeeds
223func (r FilteringResourceEventHandler) OnAdd(obj interface{}) {
224 if !r.FilterFunc(obj) {
225 return
226 }
227 r.Handler.OnAdd(obj)
228}
229
230// OnUpdate ensures the proper handler is called depending on whether the filter matches
231func (r FilteringResourceEventHandler) OnUpdate(oldObj, newObj interface{}) {

Callers

nothing calls this directly

Calls 1

OnAddMethod · 0.65

Tested by

no test coverage detected