codec

package
v1.9.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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 interface{}) ([]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 interface{}) 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