Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProgressReporter ¶
type ProgressReporter struct {
// contains filtered or unexported fields
}
ProgressReporter aggregates the progress of multiple ReportingWriters.
func NewProgressReporter ¶
func NewProgressReporter() *ProgressReporter
NewProgressReporter a ProgressReporter.
func (*ProgressReporter) NewWriter ¶
func (r *ProgressReporter) NewWriter(name string) *ReportingWriter
NewWriter creates a ReportingWriter reporting to r.
func (*ProgressReporter) Report ¶
func (r *ProgressReporter) Report() string
Report returns the aggregated progress of r.
type ReportingWriter ¶
type ReportingWriter struct {
// contains filtered or unexported fields
}
ReportingWriter is an io.Writer which reports its progress to a ProgressWriter.
func (*ReportingWriter) SetTotal ¶
func (w *ReportingWriter) SetTotal(total int64)
SetTotal sets to total size to be written to w.
func (*ReportingWriter) Stats ¶
func (w *ReportingWriter) Stats() (stats string, n, total int64)
Stats returns the local statistics to w.
Click to show internal directories.
Click to hide internal directories.