codec

package
v0.0.0-...-2d343b4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMessage = errors.New("invalid message")
)

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Reader
	Writer
	Close() error
	Name() string
}

type Marshaler

type Marshaler interface {
	Marshal(interface{}) ([]byte, error)
	Unmarshal([]byte, interface{}) error
	Name() string
}

type MessageType

type MessageType int
const (
	Error MessageType = iota
	Request
	Response
	Event
)

type NewCodec

type NewCodec func(io.ReadWriteCloser) Codec

type Reader

type Reader interface {
	Read(interface{}) error
}

type Writer

type Writer interface {
	Write(interface{}) error
}

Directories

Path Synopsis
Package json provides a json codec
Package json provides a json codec

Jump to

Keyboard shortcuts

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