Documentation
¶
Overview ¶
Package stream provides utilities for tracking download and streaming progress.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressReader ¶
type ProgressReader struct {
Reader io.Reader
Total int64
OnProgress func(downloaded, total int64)
// contains filtered or unexported fields
}
ProgressReader tracks bytes read from Reader and calls OnProgress after each nonempty read with the cumulative count and Total, when the callback is set.
Click to show internal directories.
Click to hide internal directories.