msgpack

package
v0.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package msgpack wraps github.com/vmihailenco/msgpack/v5 as a codec.Codec implementation. The library exposes an Encoder/Decoder pair so this codec also implements StreamingCodec.

Package msgpack — adapts vmihailenco's *Decoder to codec.Decoder.

Package msgpack — adapts vmihailenco's *Encoder to codec.Encoder.

Package msgpack — range 0.3.7.* (ADR 0005 service/codec/msgpack block).

Index

Constants

View Source
const CodeMsgPackMarshalFailed errs.Code = 0x00_03_07_01 // 0.3.7.1

CodeMsgPackMarshalFailed identifies a failure inside vmihailenco/msgpack/v5.Marshal.

View Source
const CodeMsgPackUnmarshalFailed errs.Code = 0x00_03_07_02 // 0.3.7.2

CodeMsgPackUnmarshalFailed identifies a failure inside vmihailenco/msgpack/v5.Unmarshal.

Variables

View Source
var (
	// MarshalFailed wraps a failure from vmihailenco/msgpack/v5.Marshal.
	MarshalFailed = errs.Define(CodeMsgPackMarshalFailed, "MARSHAL_FAILED",
		"MessagePack encoding failed",
		"service/codec/msgpack: github.com/vmihailenco/msgpack/v5.Marshal returned an error")

	// UnmarshalFailed wraps a failure from vmihailenco/msgpack/v5.Unmarshal.
	UnmarshalFailed = errs.Define(CodeMsgPackUnmarshalFailed, "UNMARSHAL_FAILED",
		"MessagePack decoding failed",
		"service/codec/msgpack: github.com/vmihailenco/msgpack/v5.Unmarshal returned an error")
)
View Source
var (
	//: register the singleton and expose it as a typed package var.
	Codec codec.Codec = codec.Register(&msgpackCodec{})
)

Package-level state: the codec singleton plus the hoisted MIME / extension tables (hoisted).

Functions

func New

func New() codec.Codec

New returns a MessagePack codec instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL