MCPcopy
hub / github.com/antrea-io/antrea / InternalEvent

Interface InternalEvent

pkg/apiserver/storage/interfaces.go:38–47  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

36// For example, an internal event may be converted to an ADDED event for one watcher, and to a MODIFIED event
37// for another.
38type 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

Callers 8

sendWatchEventMethod · 0.65
createResourcesFunction · 0.65
ConvertToTableMethod · 0.65
ConvertToTableMethod · 0.65
ConvertToTableMethod · 0.65
ConvertToTableMethod · 0.65
ConvertToTableMethod · 0.65
processMethod · 0.65

Implementers 9

supportBundleCollectionEventpkg/controller/supportbundlecollection
appliedToGroupEventpkg/controller/networkpolicy/store/app
addressGroupEventpkg/controller/networkpolicy/store/add
networkPolicyEventpkg/controller/networkpolicy/store/net
egressGroupEventpkg/controller/egress/store/egressgrou
simpleInternalEventpkg/apiserver/storage/ram/watch_test.g
emptyInternalEventpkg/apiserver/storage/ram/watch_test.g
testEventpkg/apiserver/storage/ram/store_test.g
bookmarkEventpkg/apiserver/storage/ram/watch.go

Calls

no outgoing calls

Tested by

no test coverage detected