Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { // Decode decodes data and stores the result in out. Decode(data, out interface{}) error // Encode encodes in and stores the result in data. Encode(in interface{}) (data interface{}, err error) }
Codec is a codec (encoder and decoder) for an event.
type DefaultCodecs ¶
func NewDefaultCodecs ¶
func NewDefaultCodecs(d Codec, namedCodecs ...NamedCodec) *DefaultCodecs
func (*DefaultCodecs) EncodeDecoder ¶
func (dc *DefaultCodecs) EncodeDecoder(name string) Codec
type NamedCodec ¶
NamedCodec holds a codec and its corresponding operation name.
func Op ¶
func Op(name string, codec Codec) NamedCodec
Op is a shortcut for creating an instance of NamedCodec.
Click to show internal directories.
Click to hide internal directories.