Implement a streaming serializer for watch

Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
This commit is contained in:
Clayton Coleman
2016-04-04 23:07:43 -04:00
parent 87146c4255
commit 3474911736
29 changed files with 562 additions and 146 deletions

View File

@@ -20,6 +20,7 @@ import (
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/runtime"
versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
)
// GroupName is the group name use in this package
@@ -41,6 +42,7 @@ func addKnownTypes(scheme *runtime.Scheme) {
&JobList{},
&v1.ListOptions{},
)
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
}
func (obj *Job) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }