client-go/tools: Docs: Clarify what's "old" core/v1 and what's "new" events/v1beta1

Kubernetes-commit: 2c4bb0fa4db88462a61995d9179fad801b00d69d
This commit is contained in:
Luke Shumaker
2019-11-12 08:30:24 -05:00
committed by Kubernetes Publisher
parent 5971a24b40
commit f5d68cde58
3 changed files with 25 additions and 5 deletions

View File

@@ -132,14 +132,14 @@ type EventBroadcaster interface {
Shutdown()
}
// EventRecorderAdapter is a wrapper around EventRecorder implementing the
// new EventRecorder interface.
// EventRecorderAdapter is a wrapper around a "k8s.io/client-go/tools/record".EventRecorder
// implementing the new "k8s.io/client-go/tools/events".EventRecorder interface.
type EventRecorderAdapter struct {
recorder EventRecorder
}
// NewEventRecorderAdapter returns an adapter implementing new EventRecorder
// interface.
// NewEventRecorderAdapter returns an adapter implementing the new
// "k8s.io/client-go/tools/events".EventRecorder interface.
func NewEventRecorderAdapter(recorder EventRecorder) *EventRecorderAdapter {
return &EventRecorderAdapter{
recorder: recorder,