MCPcopy
hub / github.com/kubernetes/client-go / OnCreateFactory

Function OnCreateFactory

tools/record/event_test.go:71–77  ·  view source on GitHub ↗
(testCache map[string]*v1.Event, createEvent chan<- *v1.Event)

Source from the content-addressed store, hash-verified

69type OnCreateFunc func(*v1.Event) (*v1.Event, error)
70
71func OnCreateFactory(testCache map[string]*v1.Event, createEvent chan<- *v1.Event) OnCreateFunc {
72 return func(event *v1.Event) (*v1.Event, error) {
73 testCache[getEventKey(event)] = event
74 createEvent <- event
75 return event, nil
76 }
77}
78
79type OnPatchFunc func(*v1.Event, []byte) (*v1.Event, error)
80

Callers 3

TestEventfFunction · 0.85
TestEventfNoNamespaceFunction · 0.85
TestMultiSinkCacheFunction · 0.85

Calls 1

getEventKeyFunction · 0.85

Tested by

no test coverage detected