codec

package
v0.0.0-...-37bb5ba Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewCodecFuncMap map[Type]NewCodecFunc

Functions

This section is empty.

Types

type Codec

type Codec interface {
	io.Closer
	ReadHeader(*Header) error
	ReadBody(interface{}) error
	Write(*Header, interface{}) error
}

type GobCodec

type GobCodec struct {
	// contains filtered or unexported fields
}
type Header struct {
	ServiceMethod string //format "Service.Method"
	Seq           uint64 //sequence number closen by client
	Error         string
}

type NewCodecFunc

type NewCodecFunc func(io.ReadWriteCloser) Codec

type Type

type Type string
const (
	GobType Type = "application/gob"
	Json    Type = "application/json"
)

Jump to

Keyboard shortcuts

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