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

Struct FilteringResourceEventHandler

tools/cache/controller.go:217–220  ·  view source on GitHub ↗

FilteringResourceEventHandler applies the provided filter to all events coming in, ensuring the appropriate nested handler method is invoked. An object that starts passing the filter after an update is considered an add, and an object that stops passing the filter after an update is considered a del

Source from the content-addressed store, hash-verified

215// that starts passing the filter after an update is considered an add, and an
216// object that stops passing the filter after an update is considered a delete.
217type FilteringResourceEventHandler struct {
218 FilterFunc func(obj interface{}) bool
219 Handler ResourceEventHandler
220}
221
222// OnAdd calls the nested handler only if the filter succeeds
223func (r FilteringResourceEventHandler) OnAdd(obj interface{}) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected