iodup

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IoDups added in v0.6.0

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

func NewIoDups added in v0.6.0

func NewIoDups(params ...uint) (iodups *IoDups)

NewIoDups creates iodups cache and set the iodups defaults 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)

func (*IoDups) NewIoDup added in v0.6.0

func (iodups *IoDups) NewIoDup(src io.ReadCloser) []*Out

Create a New iodup to wrap an existing provider of an io.ReadCloser interface The new iodup.out[] will expose an io.ReadCloser interface 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 Iodup

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

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