iosizer

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 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 SizeReadWriter

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

SizeReadWriter implements io methods keeping total size metrics.

func NewSizeReadWriter

func NewSizeReadWriter(rdr io.Reader, writer io.Writer) *SizeReadWriter

NewSizeReadWriter constructs a read/writer with size metrics.

func (*SizeReadWriter) Read

func (s *SizeReadWriter) Read(p []byte) (n int, err error)

Read reads data from the source.

func (*SizeReadWriter) TotalSize

func (s *SizeReadWriter) TotalSize() uint64

TotalSize returns the total amount of data transferred.

func (*SizeReadWriter) Write

func (s *SizeReadWriter) Write(p []byte) (n int, err error)

Write writes data to the writer.

Jump to

Keyboard shortcuts

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