protobuf

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: BSD-3-Clause Imports: 7 Imported by: 2 modules, 11 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = errors.New("timeout")

Functions

func NewWriterAndReader

func NewWriterAndReader(s p2p.Stream) (Writer, Reader)

Types

type Message

type Message = proto.Message

func ReadMessages

func ReadMessages(r io.Reader, newMessage func() Message) (m []Message, err error)

type Reader

type Reader struct {
	ggio.Reader
}

func NewReader

func NewReader(r io.Reader) Reader

func (Reader) ReadMsgWithContext

func (r Reader) ReadMsgWithContext(ctx context.Context, msg proto.Message) error

func (Reader) ReadMsgWithTimeout

func (r Reader) ReadMsgWithTimeout(d time.Duration, msg proto.Message) error

type Writer

type Writer struct {
	ggio.Writer
}

func NewWriter

func NewWriter(w io.Writer) Writer

func (Writer) WriteMsgWithContext

func (w Writer) WriteMsgWithContext(ctx context.Context, msg proto.Message) error

func (Writer) WriteMsgWithTimeout

func (w Writer) WriteMsgWithTimeout(d time.Duration, msg proto.Message) error

Directories

Path Synopsis
internal
pb
Package pb holds only Protocol Buffer definitions and generated code for testing purposes.
Package pb holds only Protocol Buffer definitions and generated code for testing purposes.

Jump to

Keyboard shortcuts

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