rewrite signature of function StartEventWatcher

Kubernetes-commit: c8291e393b32f8ce4e8fd1d4f18e848247be13f8
This commit is contained in:
jlsong01
2022-07-29 23:43:05 +08:00
committed by Kubernetes Publisher
parent cbe28cf468
commit 34679611a8
3 changed files with 26 additions and 13 deletions

View File

@@ -55,7 +55,7 @@ type EventBroadcaster interface {
// of StartRecordingToSink. This lets you also process events in a custom way (e.g. in tests).
// NOTE: events received on your eventHandler should be copied before being used.
// TODO: figure out if this can be removed.
StartEventWatcher(eventHandler func(event runtime.Object)) func()
StartEventWatcher(eventHandler func(event runtime.Object)) (func(), error)
// StartStructuredLogging starts sending events received from this EventBroadcaster to the structured
// logging function. The return value can be ignored or used to stop recording, if desired.