protobuf

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: Apache-2.0 Imports: 3 Imported by: 22

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