protobuf

package
v1.34.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 23

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 any) error

Decode

func (*ProtobufEncoder) Encode

func (pb *ProtobufEncoder) Encode(subject string, v any) ([]byte, error)

Encode

Jump to

Keyboard shortcuts

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