codec

package
v0.0.0-...-02b6452 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 2

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 implents the encoding.Codec interface method

func (*Proxy) Name

func (*Proxy) Name() string

Name implents the encoding.Codec interface method

func (*Proxy) Unmarshal

func (p *Proxy) Unmarshal(data []byte, v interface{}) error

Unmarshal implents the encoding.Codec interface method

Jump to

Keyboard shortcuts

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