OnAdd calls the nested handler only if the filter succeeds
(obj interface{})
| 221 | |
| 222 | // OnAdd calls the nested handler only if the filter succeeds |
| 223 | func (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 |
| 231 | func (r FilteringResourceEventHandler) OnUpdate(oldObj, newObj interface{}) { |