Back to godoc.org

Package versioning

v0.18.8
Latest Go to latest
Published: 3 days ago | License: Apache-2.0 | Module: k8s.io/apimachinery

Index

Package Files

func NewCodec

func NewCodec(
	encoder runtime.Encoder,
	decoder runtime.Decoder,
	convertor runtime.ObjectConvertor,
	creater runtime.ObjectCreater,
	typer runtime.ObjectTyper,
	defaulter runtime.ObjectDefaulter,
	encodeVersion runtime.GroupVersioner,
	decodeVersion runtime.GroupVersioner,
	originalSchemeName string,
) 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 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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier