mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-12 13:25:29 +00:00
Support SetStructuredLogging with the new events library
Kubernetes-commit: 230cb00ddd989ae2359696f6aa09a71253936a49
This commit is contained in:
committed by
Kubernetes Publisher
parent
3511ef41b1
commit
93595145a2
@@ -20,6 +20,7 @@ import (
|
||||
eventsv1 "k8s.io/api/events/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/tools/record"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// EventRecorder knows how to record events on behalf of an EventSource.
|
||||
@@ -56,6 +57,10 @@ type EventBroadcaster interface {
|
||||
// TODO: figure out if this can be removed.
|
||||
StartEventWatcher(eventHandler func(event runtime.Object)) func()
|
||||
|
||||
// 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.
|
||||
StartStructuredLogging(verbosity klog.Level) func()
|
||||
|
||||
// Shutdown shuts down the broadcaster
|
||||
Shutdown()
|
||||
}
|
||||
|
Reference in New Issue
Block a user