protobufencoder

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package protobuf provides a Protocol Buffers encoder for Conduit messages. Protocol Buffers provide strongly-typed schemas with excellent performance, backward/forward compatibility, and cross-language support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct{}

Encoder implements conduit.Encoder using Protocol Buffers binary serialization. It provides type-safe encoding with schema validation, making it ideal for production microservices and cross-language communication.

func New

func New() *Encoder

New creates a new Protocol Buffers encoder.

func (*Encoder) Decode

func (e *Encoder) Decode(data []byte, v any) error

Decode deserializes Protocol Buffers bytes into v. The value v must implement proto.Message.

func (*Encoder) Encode

func (e *Encoder) Encode(v any) ([]byte, error)

Encode serializes v to Protocol Buffers bytes. The value v must implement proto.Message.

Jump to

Keyboard shortcuts

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