Documentation ¶
Index ¶
- func NewCodec(encoder runtime.Encoder, decoder runtime.Decoder, ...) runtime.Codec
- func NewCodecForScheme(scheme *runtime.Scheme, encoder runtime.Encoder, decoder runtime.Decoder, ...) runtime.Codec
- func NewDefaultingCodecForScheme(scheme *runtime.Scheme, encoder runtime.Encoder, decoder runtime.Decoder, ...) runtime.Codec
- type DirectDecoder
- type DirectEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCodec ¶
func NewCodec( encoder runtime.Encoder, decoder runtime.Decoder, convertor runtime.ObjectConvertor, creater runtime.ObjectCreater, copier runtime.ObjectCopier, typer runtime.ObjectTyper, defaulter runtime.ObjectDefaulter, encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, ) runtime.Codec
NewCodec takes objects in their internal versions and converts them to external versions before serializing them. It assumes the serializer provided to it only deals with external versions. This class is also a serializer, but is generally used with a specific version.
func NewCodecForScheme ¶
func NewCodecForScheme( scheme *runtime.Scheme, encoder runtime.Encoder, decoder runtime.Decoder, encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, ) runtime.Codec
NewCodecForScheme is a convenience method for callers that are using a scheme.
func NewDefaultingCodecForScheme ¶
func NewDefaultingCodecForScheme( scheme *runtime.Scheme, encoder runtime.Encoder, decoder runtime.Decoder, encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, ) runtime.Codec
NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme.
Types ¶
type DirectDecoder ¶ added in v1.4.0
DirectDecoder clears the group version kind of a deserialized object.
func (DirectDecoder) Decode ¶ added in v1.4.0
func (d DirectDecoder) Decode(data []byte, defaults *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error)
Decode does not do conversion. It removes the gvk during deserialization.
type DirectEncoder ¶ added in v1.4.0
type DirectEncoder struct { runtime.Encoder runtime.ObjectTyper }
DirectEncoder serializes an object and ensures the GVK is set.
Click to show internal directories.
Click to hide internal directories.