mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-26 04:36:00 +00:00
Do interface{} -> runtime.Object rename everywhere
This commit is contained in:
@@ -18,6 +18,8 @@ package watch
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
// Interface can be implemented by anything that knows how to watch and report changes.
|
||||
@@ -47,7 +49,7 @@ type Event struct {
|
||||
|
||||
// If Type == Deleted, then this is the state of the object
|
||||
// immediately before deletion.
|
||||
Object interface{}
|
||||
Object runtime.Object
|
||||
}
|
||||
|
||||
// FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
|
||||
@@ -78,21 +80,21 @@ func (f *FakeWatcher) ResultChan() <-chan Event {
|
||||
}
|
||||
|
||||
// Add sends an add event.
|
||||
func (f *FakeWatcher) Add(obj interface{}) {
|
||||
func (f *FakeWatcher) Add(obj runtime.Object) {
|
||||
f.result <- Event{Added, obj}
|
||||
}
|
||||
|
||||
// Modify sends a modify event.
|
||||
func (f *FakeWatcher) Modify(obj interface{}) {
|
||||
func (f *FakeWatcher) Modify(obj runtime.Object) {
|
||||
f.result <- Event{Modified, obj}
|
||||
}
|
||||
|
||||
// Delete sends a delete event.
|
||||
func (f *FakeWatcher) Delete(lastValue interface{}) {
|
||||
func (f *FakeWatcher) Delete(lastValue runtime.Object) {
|
||||
f.result <- Event{Deleted, lastValue}
|
||||
}
|
||||
|
||||
// Action sends an event of the requested type, for table-based testing.
|
||||
func (f *FakeWatcher) Action(action EventType, obj interface{}) {
|
||||
func (f *FakeWatcher) Action(action EventType, obj runtime.Object) {
|
||||
f.result <- Event{action, obj}
|
||||
}
|
||||
|
Reference in New Issue
Block a user