filter

package
v0.0.0-...-34384d2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(reader io.Reader, callbacks ...ReaderCallback) *Reader

NewReader creates a new Reader, applying all the provided functional options.

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read(data []byte) (int, error)

Read reads a few bytes, then calls all registered callback one at a time.

type ReaderCallback

type ReaderCallback func(r *Reader, data []byte, count int)

type Writer

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

func NewWriter

func NewWriter(writer io.Writer, callbacks ...WriterCallback) *Writer

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Write

func (w *Writer) Write(data []byte) (int, error)

Write writes the given bytes, then calls all registered callbacks one at a time.

type WriterCallback

type WriterCallback func(w *Writer, data []byte, count int)

Jump to

Keyboard shortcuts

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