MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / Encode

Method Encode

lib/encoding/messagepack.go:70–77  ·  view source on GitHub ↗

Encode method for MessagePackCodec. It encodes the input value into a byte slice using MessagePack. Returns encoded byte slice or error.

(msg interface{})

Source from the content-addressed store, hash-verified

68// Encode method for MessagePackCodec. It encodes the input value into a byte slice using MessagePack.
69// Returns encoded byte slice or error.
70func (m *MessagePackCodec) Encode(msg interface{}) ([]byte, error) {
71 var b []byte
72 err := codec.NewEncoderBytes(&b, m.MsgPack).Encode(msg)
73 if err != nil {
74 return nil, err
75 }
76 return b, nil
77}
78
79// Encode is a method for MessagePackCodecEncoder.
80// It takes in msg of type interface{} as input, that is to be encoded.

Callers 14

EncodeMethod · 0.45
EncodeMessagePackFunction · 0.45
TestEncodeFunction · 0.45
TestAddExtensionFunction · 0.45
setSetToDBMethod · 0.45
BytesMethod · 0.45
setZSetToDBMethod · 0.45
MarshalBinaryMethod · 0.45

Calls

no outgoing calls