Documentation
¶
Overview ¶
Package tracker provides progress tracking
Index ¶
- type ByteTrackerFilter
- func (bt *ByteTrackerFilter) Add(t time.Time, complete, total int64)
- func (bt *ByteTrackerFilter) Completed() int64
- func (bt *ByteTrackerFilter) Format(short bool) string
- func (bt *ByteTrackerFilter) FormatCompleted(dt time.Duration) string
- func (bt *ByteTrackerFilter) String() string
- func (bt *ByteTrackerFilter) Total() int64
- type Counter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteTrackerFilter ¶
type ByteTrackerFilter struct {
// contains filtered or unexported fields
}
ByteTrackerFilter takes updates of the number of bytes processed/transferred and produces estimates of the time to complete and speed.
func NewByteTrackerFilter ¶
func NewByteTrackerFilter() *ByteTrackerFilter
NewByteTrackerFilter constructs a new byte tracker filter.
func (*ByteTrackerFilter) Add ¶
func (bt *ByteTrackerFilter) Add(t time.Time, complete, total int64)
Add adds to the complete and total at the given time.
func (*ByteTrackerFilter) Completed ¶
func (bt *ByteTrackerFilter) Completed() int64
Completed returns the number of completed bytes.
func (*ByteTrackerFilter) Format ¶
func (bt *ByteTrackerFilter) Format(short bool) string
Format the byte tracker data.
func (*ByteTrackerFilter) FormatCompleted ¶
func (bt *ByteTrackerFilter) FormatCompleted(dt time.Duration) string
FormatCompleted returns the final formatted completion message.
func (*ByteTrackerFilter) String ¶
func (bt *ByteTrackerFilter) String() string
String implements fmt.Stringer interface.
func (*ByteTrackerFilter) Total ¶
func (bt *ByteTrackerFilter) Total() int64
Total returns the total number of bytes.
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter represents a simple counter.
func (*Counter) AddCompleted ¶
AddCompleted adds to the completed count.
Click to show internal directories.
Click to hide internal directories.