codec

package
v1.16.20 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Name = "proto"

Name is the name by which the proxy codec is registered in the encoding codec registry We have to say that we are the "proto" codec otherwise marshaling will fail.

Variables

This section is empty.

Functions

func Register

func Register()

Register manually registers the codec.

Types

type Frame

type Frame struct {
	// contains filtered or unexported fields
}

Frame holds the proxy transported data.

func (*Frame) ProtoMessage

func (f *Frame) ProtoMessage()

ProtoMessage tags a frame as valid proto message.

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy satisfies the encoding.Codec interface.

func (*Proxy) Marshal

func (p *Proxy) Marshal(v any) ([]byte, error)

Marshal implements the encoding.Codec interface method.

func (*Proxy) Name

func (*Proxy) Name() string

Name implements the encoding.Codec interface method.

func (*Proxy) Unmarshal

func (p *Proxy) Unmarshal(data []byte, v any) error

Unmarshal implements the encoding.Codec interface method.

Jump to

Keyboard shortcuts

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