blocking

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

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 is an io.Reader that blocks until the underlying reader until returns something other than io.EOF.

on EOF, it'll keep trying to read every 10ms.

The purpose of this is to be used to "emulate a STDIN" (which never EOFs) from another io.Reader, e.g. a bytes.Buffer.

func New

func New(r io.Reader) Reader

New wraps a given io.Reader into a BlockingReader.

func (Reader) Read

func (r Reader) Read(data []byte) (int, error)

Jump to

Keyboard shortcuts

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