go-nats: github.com/nats-io/go-nats/encoders/protobuf Index | Files

package protobuf

import "github.com/nats-io/go-nats/encoders/protobuf"

Index

Package Files

protobuf_enc.go

Constants

const (
    PROTOBUF_ENCODER = "protobuf"
)

Additional index for registered Encoders.

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

type ProtobufEncoder Uses

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 Uses

func (pb *ProtobufEncoder) Decode(subject string, data []byte, vPtr interface{}) error

Decode

func (*ProtobufEncoder) Encode Uses

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

Encode

Package protobuf imports 3 packages (graph) and is imported by 3 packages. Updated 2019-06-09. Refresh now. Tools for package owners.