Do interface{} -> runtime.Object rename everywhere

This commit is contained in:
Daniel Smith
2014-09-05 19:22:03 -07:00
parent 1c2b65788d
commit 0d30a656ef
33 changed files with 190 additions and 198 deletions

View File

@@ -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}
}