dio

package
v1.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dio adds dynamic behaviour to the standard io package mutliX types

Package dio adds dynamic behaviour to the standard io package mutliX types

Package dio adds dynamic behaviour to the standard io package mutliX types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseWriter

type CloseWriter interface {
	CloseWrite() error
}

CloseWriter is an interface that implements structs that close input streams to prevent from writing.

type DynamicMultiReader

type DynamicMultiReader interface {
	io.Reader
	Add(...io.Reader)
	Remove(io.Reader)
	Close() error
	PropagateEOF(bool)
}

DynamicMultiReader adds dynamic add/remove to the base multireader behaviour

func MultiReader

func MultiReader(readers ...io.Reader) DynamicMultiReader

MultiReader returns a Reader that's the logical concatenation of the provided input readers. They're read sequentially. Once all inputs have returned EOF, Read will return EOF. If any of the readers return a non-nil, non-EOF error, Read will return that error.

type DynamicMultiWriter

type DynamicMultiWriter interface {
	io.Writer
	Add(...io.Writer)
	Remove(io.Writer)
	Close() error
}

DynamicMultiWriter adds dynamic add/remove to the base multiwriter behaviour

func MultiWriter

func MultiWriter(writers ...io.Writer) DynamicMultiWriter

MultiWriter extends io.MultiWriter to allow add/remove of writers dynamically without disrupting existing writing

Jump to

Keyboard shortcuts

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