Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskBufferReader ¶
type DiskBufferReader struct {
// contains filtered or unexported fields
}
DiskBufferReader uses an io.Reader and stores read bytes to a tmp file so the reader can be reset to the start.
func New ¶
func New(r io.Reader) (*DiskBufferReader, error)
New takes an io.Reader and creates returns an initialized DiskBufferReader.
func (*DiskBufferReader) Close ¶
func (dbr *DiskBufferReader) Close() error
Close the reader and delete the tmp file.
func (*DiskBufferReader) Read ¶
func (dbr *DiskBufferReader) Read(out []byte) (int, error)
Read from the len(out) bytes from the reader starting at the current index.
func (*DiskBufferReader) Reset ¶
func (dbr *DiskBufferReader) Reset() error
Reset the reader position to the start.
func (*DiskBufferReader) Stop ¶
func (dbr *DiskBufferReader) Stop()
Stop storing the read bytes in the tmp file.
Click to show internal directories.
Click to hide internal directories.