io

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options interface {
	// ResettableReaderFn returns the reader function.
	SetResettableReaderFn(value ResettableReaderFn) Options

	// // ResettableReaderFn sets the reader function.
	ResettableReaderFn() ResettableReaderFn

	// ResettableWriterFn returns the writer function.
	SetResettableWriterFn(value ResettableWriterFn) Options

	// ResettableWriterFn sets the writer function.
	ResettableWriterFn() ResettableWriterFn
}

Options are options for resettable readers and writers.

func NewOptions

func NewOptions() Options

NewOptions creates a new read write options.

type ResettableReader

type ResettableReader interface {
	io.Reader
	Reset(r io.Reader)
}

ResettableReader is a resettable reader.

type ResettableReaderFn

type ResettableReaderFn func(r io.Reader, opts ResettableReaderOptions) ResettableReader

ResettableReaderFn creates a resettable reader.

type ResettableReaderOptions

type ResettableReaderOptions struct {
	ReadBufferSize int
}

ResettableReaderOptions are options for a resettable reader.

type ResettableWriter

type ResettableWriter interface {
	io.Writer
	Flush() error
	Reset(w io.Writer)
}

ResettableWriter is a resettable writer.

type ResettableWriterFn

type ResettableWriterFn func(r io.Writer, opts ResettableWriterOptions) ResettableWriter

ResettableWriterFn creates a resettable writer.

type ResettableWriterOptions

type ResettableWriterOptions struct {
	WriteBufferSize int
}

ResettableWriterOptions are options for a resettable writer.

Jump to

Keyboard shortcuts

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