wire

package
v2.0.27+incompatible Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMalformedMessage = errors.New("malformed wire format")
)
View Source
var (
	ErrMalformedProtobuf = errors.New("malformed protobuf")
)

Functions

func Validate

func Validate(buf []byte) error

Types

type Message

type Message struct {
	Kind uint16
	Data []byte

	Log *memorywriter.MemoryWriter
}

func ReadFrom

func ReadFrom(r io.Reader, mw *memorywriter.MemoryWriter) (*Message, error)

func (*Message) WriteTo

func (m *Message) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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