protostream

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: GPL-3.0 Imports: 8 Imported by: 1

README

protostream

Read and write streams of Protocol Buffers messages and raw data

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadWriter

type ReadWriter struct {
	*Reader
	*Writer
}

func New

func New(rw io.ReadWriter) ReadWriter

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) ReadMessage

func (r *Reader) ReadMessage(m proto.Message) (err error)

func (*Reader) ReadStream

func (r *Reader) ReadStream(chunkHandler func([]byte) error) (err error)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Flush

func (w *Writer) Flush() error

func (*Writer) WriteMessage

func (w *Writer) WriteMessage(m proto.Message) (err error)

func (*Writer) WriteStream

func (w *Writer) WriteStream(filler func([]byte) (int, error)) (err error)

Jump to

Keyboard shortcuts

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