protobuf

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROTOBUF_ENCODER = "protobuf"
)

Additional index for registered Encoders.

Variables

View Source
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")
)

Functions

This section is empty.

Types

type ProtobufEncoder

type ProtobufEncoder struct {
}

ProtobufEncoder is a protobuf 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

Decode

func (*ProtobufEncoder) Encode

func (pb *ProtobufEncoder) Encode(subject string, v interface{}) ([]byte, error)

Encode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL