package protobuf
import "github.com/nats-io/nats.go/encoders/protobuf"
Index ¶
Constants ¶
const (
PROTOBUF_ENCODER = "protobuf"
)
Variables ¶
var ( ErrInvalidProtoMsgEncode = errors.New("nats: Invalid protobuf proto.Message object passed to encode") ErrInvalidProtoMsgDecode = errors.New("nats: Invalid protobuf proto.Message object passed to decode") )
Types ¶
type ProtobufEncoder ¶
type ProtobufEncoder struct { }
A protobuf Encoder implementation for EncodedConn This encoder will use the builtin protobuf lib to Marshal and Unmarshal structs.
func (*ProtobufEncoder) Decode ¶
func (pb *ProtobufEncoder) Decode(subject string, data []byte, vPtr interface{}) error
func (*ProtobufEncoder) Encode ¶
func (pb *ProtobufEncoder) Encode(subject string, v interface{}) ([]byte, error)
Source Files ¶
- Version
- v1.1.2
- Published
- Sep 18, 2015
- Platform
- windows/amd64
- Imports
- 3 packages
- Last checked
- 12 minutes ago –
Tools for package owners.