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.
| 184 | // as few of the notification functions as you want while still implementing |
| 185 | // ResourceEventHandler. |
| 186 | type 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. |
| 193 | func (r ResourceEventHandlerFuncs) OnAdd(obj interface{}) { |
nothing calls this directly
no outgoing calls
no test coverage detected