iotimeout

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT, MIT Imports: 5 Imported by: 2

README

iotimeout

-- import "github.com/cmcoffee/go-snuglib/iotimeout"

Usage

var ErrTimeout = errors.New("Timeout reached while waiting for bytes.")
func NewReadCloser
func NewReadCloser(source io.ReadCloser, timeout time.Duration) io.ReadCloser

Timeout ReadCloser: Adds a timer to io.ReadCloser

func NewReader
func NewReader(source io.Reader, timeout time.Duration) io.Reader

Timeout Reader: Adds a time to io.Reader

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = errors.New("Timeout reached while waiting for bytes.")

Functions

func NewReadCloser

func NewReadCloser(source io.ReadCloser, timeout time.Duration) io.ReadCloser

Timeout ReadCloser: Adds a timer to io.ReadCloser

func NewReader

func NewReader(source io.Reader, timeout time.Duration) io.Reader

Timeout Reader: Adds a time to io.Reader

Types

This section is empty.

Jump to

Keyboard shortcuts

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