delimited

package
v0.0.0-...-bee7c02 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: BSD-3-Clause, BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package delimited allows for reading of a stream of protobuf messages delimited by size. See https://developers.google.com/protocol-buffers/docs/techniques#streaming for more info.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader wraps an io.Reader and exposes methods to iterate on individual messages.

func NewReader

func NewReader(r io.Reader) *Reader

NewReader returns a Reader that reads bytes from the supplied Reader.

func (*Reader) Next

func (r *Reader) Next() ([]byte, error)

Next returns a byte slice with the next message, or an error: * io.EOF if there are no messages remaining * io.ErrUnexpectedEOF if the stream is corrupted

Jump to

Keyboard shortcuts

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