iodup

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iodup

type Iodup struct {
	Output []*Out
	// contains filtered or unexported fields
}

func New

func New(src io.ReadCloser, params ...uint) (iod *Iodup)

Create a New iodup to wrap an existing provider of an io.ReadCloser interface The new iodup.out[] will expose an io.ReadCloser interface The optional params may include 3 optional integers as parameters: 1. The number of outputs (default is 2) 2. The number of buffers which may be at least 3 (default is 1024) 3. The size of the buffers (default is 8192) A goroutine will be initiated to wait on the original provider Read interface and deliver the data to the Readwer using an internal channel

type Out

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

An Iodup object maintining internal buffers and state

func (*Out) Close

func (out *Out) Close() error

The io.Close interface of the iodup

func (*Out) Read

func (out *Out) Read(dest []byte) (n int, err error)

The io.Read interface of the iodup

Jump to

Keyboard shortcuts

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