generated: refactor

This commit is contained in:
Clayton Coleman
2016-11-20 21:55:31 -05:00
parent a43960da3b
commit 35a6bfbcee
626 changed files with 4220 additions and 3890 deletions

View File

@@ -22,8 +22,8 @@ go_library(
],
tags = ["automanaged"],
deps = [
"//pkg/api/unversioned:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/util/net:go_default_library",
"//pkg/util/runtime:go_default_library",
"//pkg/util/wait:go_default_library",
@@ -44,8 +44,8 @@ go_test(
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/unversioned:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/util/wait:go_default_library",
],
)

View File

@@ -19,8 +19,8 @@ package watch
import (
"sync"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/runtime/schema"
)
// FullChannelBehavior controls how the Broadcaster reacts if a watcher's watch
@@ -81,8 +81,8 @@ const internalRunFunctionMarker = "internal-do-function"
// a function type we can shoehorn into the queue.
type functionFakeRuntimeObject func()
func (obj functionFakeRuntimeObject) GetObjectKind() unversioned.ObjectKind {
return unversioned.EmptyObjectKind
func (obj functionFakeRuntimeObject) GetObjectKind() schema.ObjectKind {
return schema.EmptyObjectKind
}
// Execute f, blocking the incoming queue (and waiting for it to drain first).

View File

@@ -22,7 +22,7 @@ import (
"testing"
"time"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/util/wait"
)
@@ -31,7 +31,7 @@ type myType struct {
Value string
}
func (obj *myType) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind }
func (obj *myType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func TestBroadcaster(t *testing.T) {
table := []Event{

View File

@@ -21,9 +21,9 @@ go_library(
],
tags = ["automanaged"],
deps = [
"//pkg/api/unversioned:go_default_library",
"//pkg/conversion:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/runtime/serializer/streaming:go_default_library",
"//pkg/watch:go_default_library",
"//vendor:github.com/gogo/protobuf/proto",

View File

@@ -17,9 +17,9 @@ limitations under the License.
package versioned
import (
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/watch"
)
@@ -28,10 +28,10 @@ const WatchEventKind = "WatchEvent"
// AddToGroupVersion registers the watch external and internal kinds with the scheme, and ensures the proper
// conversions are in place.
func AddToGroupVersion(scheme *runtime.Scheme, groupVersion unversioned.GroupVersion) {
func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) {
scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &Event{})
scheme.AddKnownTypeWithName(
unversioned.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind),
schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind),
&InternalEvent{},
)
scheme.AddConversionFuncs(
@@ -80,5 +80,5 @@ func Convert_versioned_Event_to_versioned_InternalEvent(in *Event, out *Internal
// InternalEvent makes watch.Event versioned
type InternalEvent watch.Event
func (e *InternalEvent) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind }
func (e *Event) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind }
func (e *InternalEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func (e *Event) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }

View File

@@ -19,12 +19,12 @@ package watch
import (
"testing"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/runtime/schema"
)
type testType string
func (obj testType) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind }
func (obj testType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func TestFake(t *testing.T) {
f := NewFake()