blkio

package
v0.0.0-...-5fb8a3f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyFileReader

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

LazyFileReader implements a SizedReader which opens a file on first read and closes it again after the reader has reached EOF.

func NewFileReader

func NewFileReader(name string) (*LazyFileReader, error)

func (*LazyFileReader) Close

func (r *LazyFileReader) Close()

func (*LazyFileReader) Read

func (r *LazyFileReader) Read(b []byte) (n int, err error)

func (*LazyFileReader) Size

func (r *LazyFileReader) Size() int64

type ReaderWithSize

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

func (*ReaderWithSize) Size

func (r *ReaderWithSize) Size() int64

type SizedReader

type SizedReader interface {
	io.Reader
	Size() int64
}

SizedReader is an io.Reader with a known size

func NewSizedReader

func NewSizedReader(r io.Reader, size int64) SizedReader

NewSizedReader returns a SizedReader given a reader and a size. The returned SizedReader is a ReaderWithSize.

Jump to

Keyboard shortcuts

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