package protobuf

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

Index

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

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.

Deprecated: Encoded connections are no longer supported.

func (*ProtobufEncoder) Decode

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

Decode

Deprecated: Encoded connections are no longer supported.

func (*ProtobufEncoder) Encode

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

Encode

Deprecated: Encoded connections are no longer supported.

Source Files

protobuf_enc.go

Version
v1.41.2 (latest)
Published
Apr 17, 2025
Platform
js/wasm
Imports
3 packages
Last checked
1 day ago

Tools for package owners.