InternalEvent is an internal event that can be converted to *watch.Event based on watcher's Selectors. For example, an internal event may be converted to an ADDED event for one watcher, and to a MODIFIED event for another.
| 36 | // For example, an internal event may be converted to an ADDED event for one watcher, and to a MODIFIED event |
| 37 | // for another. |
| 38 | type InternalEvent interface { |
| 39 | // ToWatchEvent converts the InternalEvent to *watch.Event based on the provided Selectors. |
| 40 | // It will be called once for all watchers that are interested in the event. Expensive computation that will repeat |
| 41 | // for all watchers should be placed in GenEventFunc as pre-process. For example, the routine that groups a list of |
| 42 | // pods by nodes is a potential candidate. |
| 43 | ToWatchEvent(selectors *Selectors, isInitEvent bool) *watch.Event |
| 44 | // GetResourceVersion returns the resourceVersion of this event. |
| 45 | // The resourceVersion is used to filter out previously buffered events when watcher is started. |
| 46 | GetResourceVersion() uint64 |
| 47 | } |
| 48 | |
| 49 | // GenEventFunc generates InternalEvent from the add/update/delete of an object. |
| 50 | // Only a single InternalEvent will be generated for each add/update/delete, and the InternalEvent itself should be |
no outgoing calls
no test coverage detected