micro/broker/codec/codec.go

11 lines
298 B
Go
Raw Normal View History

2016-12-06 21:59:41 +03:00
package codec
// Codec is used for encoding where the broker doesn't natively support
// headers in the message type. In this case the entire message is
// encoded as the payload
type Codec interface {
Marshal(interface{}) ([]byte, error)
Unmarshal([]byte, interface{}) error
String() string
}