rereader

package
v0.0.0-...-84e37b9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReReadCloser

type ReReadCloser struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

ReReadCloser is same as ReReader but also forwards Close calls

func NewReReadCloser

func NewReReadCloser(rc io.ReadCloser) *ReReadCloser

NewReReadCloser return a initialized ReReadCloser

func (*ReReadCloser) Read

func (rc *ReReadCloser) Read(p []byte) (n int, err error)

type ReReader

type ReReader struct {
	io.Reader
	// contains filtered or unexported fields
}

ReReader transparently buffers all reads from a reader until Restarted is set to true. When restarted buffered data will be replayed on read and after that normal reading from the reader continues.

func NewReReader

func NewReReader(r io.Reader) *ReReader

NewReReader return a initialized ReReader

func (*ReReader) Read

func (rr *ReReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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