codec

package
v0.0.0-...-f3666bb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithProto

func WithProto(c Codec) (grpc.Codec, error)

Types

type Chan

type Chan struct {
	Codecs []Codec
}

func NewChan

func NewChan(names []string) (*Chan, error)

func (*Chan) Decode

func (c *Chan) Decode(dst, src []byte) ([]byte, error)

func (*Chan) Encode

func (c *Chan) Encode(dst, src []byte) ([]byte, error)

type Codec

type Codec interface {
	Encode(dst, src []byte) ([]byte, error)
	Decode(dst, src []byte) ([]byte, error)
}

func New

func New(name string, args ...interface{}) (Codec, error)

type Factory

type Factory func(...interface{}) (Codec, error)

type Snappy

type Snappy struct{}

func (Snappy) Decode

func (Snappy) Decode(dst, src []byte) ([]byte, error)

func (Snappy) Encode

func (Snappy) Encode(dst, src []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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