Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket) against all 3 media types. Adopt the `application/vnd.kubernetes.protobuf;stream=watch` media type for the content that comes back from a watch call so that it can be distinguished from a Status result.
This commit is contained in:
@@ -49,6 +49,12 @@ func (s *wrappedSerializer) SerializerForMediaType(mediaType string, options map
|
||||
|
||||
return s.serializer, true
|
||||
}
|
||||
func (s *wrappedSerializer) SupportedStreamingMediaTypes() []string {
|
||||
return nil
|
||||
}
|
||||
func (s *wrappedSerializer) StreamingSerializerForMediaType(mediaType string, options map[string]string) (runtime.Serializer, runtime.Framer, string, bool) {
|
||||
return nil, nil, "", false
|
||||
}
|
||||
|
||||
func (s *wrappedSerializer) EncoderForVersion(serializer runtime.Serializer, gv unversioned.GroupVersion) runtime.Encoder {
|
||||
return versioning.NewCodec(s.serializer, s.serializer, s.scheme, s.scheme, s.scheme, runtime.ObjectTyperToTyper(s.scheme), []unversioned.GroupVersion{gv}, nil)
|
||||
|
Reference in New Issue
Block a user