testreader

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUser = errors.New("error set by user")

ErrUser is returned by ChunkReader when the user requests an error.

Functions

func ChunkReader added in v1.0.1

func ChunkReader() (chan<- []byte, io.Reader)

ChunkReader returns a reader that returns chunks written to the control channel. The caller should write byte chunks to return to the channel, or write nil if they want the Reader to return an error. The control channel should be closed to signal EOF.

func Looper

func Looper(bs []byte) io.Reader

Looper returns a reader that will return the bytes in bs as if it was a circular buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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