package cbor
import "k8s.io/apimachinery/pkg/runtime/serializer/cbor"
Index ¶
- func NewFramer() runtime.Framer
- func NewSerializerInfo(creater runtime.ObjectCreater, typer runtime.ObjectTyper) runtime.SerializerInfo
- type Option
- type Serializer
Functions ¶
func NewFramer ¶
NewFramer returns a runtime.Framer based on RFC 8742 CBOR Sequences. Each frame contains exactly one encoded CBOR data item.
func NewSerializerInfo ¶
func NewSerializerInfo(creater runtime.ObjectCreater, typer runtime.ObjectTyper) runtime.SerializerInfo
NewSerializerInfo returns a default SerializerInfo for CBOR using the given creater and typer.
Types ¶
type Option ¶
type Option func(*options)
func Strict ¶
Strict configures a serializer to return a strict decoding error when it encounters map keys that do not correspond to a field in the target object of a decode operation. This option is disabled by default.
func Transcode ¶
Transcode configures a serializer to transcode the "raw" bytes of a decoded runtime.RawExtension or metav1.FieldsV1 object to JSON. This is enabled by default to support existing programs that depend on the assumption that objects of either type contain valid JSON.
type Serializer ¶
type Serializer interface { runtime.Serializer runtime.NondeterministicEncoder recognizer.RecognizingDecoder // contains filtered or unexported methods }
func NewSerializer ¶
func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) Serializer
NewSerializer creates and returns a serializer configured with the provided options. The default options are equivalent to explicitly passing Strict(false) and Transcode(true).
Source Files ¶
cbor.go framer.go raw.go
Directories ¶
Path | Synopsis |
---|---|
pkg/runtime/serializer/cbor/direct | Package direct provides functions for marshaling and unmarshaling between arbitrary Go values and CBOR data, with behavior that is compatible with that of the CBOR serializer. |
pkg/runtime/serializer/cbor/internal |
- Version
- v0.33.0-beta.0
- Published
- Mar 11, 2025
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 3 hours ago –
Tools for package owners.