Reader

package
v1.2.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultBufSize                  int = 1024
	DefaultMaxConsecutiveEmptyReads int = 100
	DefaultByteReads                int = -1
)

Variables

View Source
var (
	ReachedMaxBytesRead             error = errors.New("Reached max bytes read")
	ReachedMaxConsecutiveEmptyReads error = errors.New("Reached max consecutive empty reads")
)

Functions

This section is empty.

Types

type Iter

type Iter struct {
	Err error
	// contains filtered or unexported fields
}

func NewIter

func NewIter(rd *Reader) Iter

func (*Iter) Loop

func (iter *Iter) Loop() iter.Seq[byte]

type Reader

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

func NewReader

func NewReader(r io.Reader) *Reader

func NewReaderConfigured

func NewReaderConfigured(r io.Reader, bufferSize, maxEmptyConsecutiveReads int, maxByteReads int) *Reader

maxByteReads = -1 for no limit.

func (*Reader) Iter

func (rd *Reader) Iter() Iter

Jump to

Keyboard shortcuts

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