Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteCodec ¶
type ByteCodec struct{}
ByteCodec uses raw slice pf bytes and don't encode/decode.
type Codec ¶
type Codec interface { Encode(i interface{}) ([]byte, error) Decode(data []byte, i interface{}) error }
Codec defines the interface that decode/encode payload.
type JSONCodec ¶
type JSONCodec struct{}
JSONCodec uses json marshaler and unmarshaler.
type MsgpackCodec ¶
type MsgpackCodec struct{}
MsgpackCodec uses messagepack marshaler and unmarshaler.
func (MsgpackCodec) Decode ¶
func (c MsgpackCodec) Decode(data []byte, i interface{}) error
Decode decodes an object from slice of bytes.
func (MsgpackCodec) Encode ¶
func (c MsgpackCodec) Encode(i interface{}) ([]byte, error)
Encode encodes an object into slice of bytes.
type PBCodec ¶
type PBCodec struct{}
PBCodec uses protobuf marshaler and unmarshaler.
type ThriftCodec ¶
type ThriftCodec struct{}
func (ThriftCodec) Decode ¶
func (c ThriftCodec) Decode(data []byte, i interface{}) error
func (ThriftCodec) Encode ¶
func (c ThriftCodec) Encode(i interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.