diskio

package
v0.0.0-...-f09cf9b Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(file string) (bool, error)

Types

type MeteredReader

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

func NewMeteredReader

func NewMeteredReader(r io.Reader, cb MeteredReaderCallback) *MeteredReader

func (*MeteredReader) Read

func (m *MeteredReader) Read(p []byte) (n int, err error)

Read passes the read through to the underlying reader. On a successful read, it will trigger the attached callback and provide it with metrics. If no callback is set, it will ignore it.

type MeteredReaderCallback

type MeteredReaderCallback func(read int64, nanoseconds int64)

Jump to

Keyboard shortcuts

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