add an adapter for EventSink

This commit is contained in:
Chao Xu 2016-01-29 15:07:10 -08:00
parent e2d02abb83
commit 55f039fd53

View File

@ -137,3 +137,20 @@ func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, i
func GetInvolvedObjectNameFieldLabel(version string) string {
return "involvedObject.name"
}
// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
type EventSinkImpl struct {
Interface EventInterface
}
func (e *EventSinkImpl) Create(event *api.Event) (*api.Event, error) {
return e.Interface.CreateWithEventNamespace(event)
}
func (e *EventSinkImpl) Update(event *api.Event) (*api.Event, error) {
return e.Interface.UpdateWithEventNamespace(event)
}
func (e *EventSinkImpl) Patch(event *api.Event, data []byte) (*api.Event, error) {
return e.Interface.Patch(event, data)
}