Ejemplo n.º 1
0
// DecoderToVersion returns an decoder that does not do conversion. gv is ignored.
func (f DirectCodecFactory) DecoderToVersion(serializer runtime.Decoder, gv unversioned.GroupVersion) runtime.Decoder {
	return DirectCodec{
		runtime.NewCodec(nil, serializer),
		nil,
	}
}
Ejemplo n.º 2
0
// EncoderForVersion returns an encoder that does not do conversion. gv is ignored.
func (f DirectCodecFactory) EncoderForVersion(serializer runtime.Encoder, gv unversioned.GroupVersion) runtime.Encoder {
	return DirectCodec{
		runtime.NewCodec(serializer, nil),
		f.CodecFactory.scheme,
	}
}