io

package
v0.0.0-...-05fba6c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelableReadCloser

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

CancelableReadCloser essentially reads from the provided reader so that it can be read by the Read(..) method.

The read allows the caller to cancel (i.e via close) the reader without waiting for the read to be stuck in a blocking mode.

see: _examples/ex_cancelable_reader.go for example usage

func NewCancelableReadCloser

func NewCancelableReadCloser(ctx context.Context) *CancelableReadCloser

func (*CancelableReadCloser) Close

func (crc *CancelableReadCloser) Close() error

func (*CancelableReadCloser) Read

func (crc *CancelableReadCloser) Read(buf []byte) (int, error)

func (*CancelableReadCloser) Start

func (crc *CancelableReadCloser) Start(input io.Reader) error

Jump to

Keyboard shortcuts

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