Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
MessageColor text.Colors
SpeedColor text.Colors
PercentColor text.Colors
TimeColor text.Colors
ValueColor text.Colors
TrackerColor text.Colors
Style progress.Style
TrackerPosition progress.Position
MessageLength int
UpdateFrequency time.Duration
TrackerLength int
ShowValue bool
ShowETA bool
ShowSpeed bool
ShowTracker bool
ShowTime bool
ShowPercentage bool
}
Options defines configuration for progress tracking.
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions provides sensible default configuration.
type PrettyProgressTracker ¶
type PrettyProgressTracker struct {
// contains filtered or unexported fields
}
PrettyProgressTracker implements getter.ProgressTracker using go-pretty for visual feedback.
func (*PrettyProgressTracker) Clear ¶
func (t *PrettyProgressTracker) Clear()
Clear removes all trackers from this progress tracker.
func (*PrettyProgressTracker) TrackProgress ¶
func (t *PrettyProgressTracker) TrackProgress( src string, currentSize, totalSize int64, stream io.ReadCloser, ) io.ReadCloser
TrackProgress is called by go-getter to monitor a download stream.
func (*PrettyProgressTracker) Wait ¶
func (t *PrettyProgressTracker) Wait()
Wait decrements the active count.
type ProgressManager ¶
type ProgressManager struct {
// contains filtered or unexported fields
}
ProgressManager handles progress tracking with configurable options.
func NewProgressManager ¶
func NewProgressManager(opts Options) *ProgressManager
NewProgressManager creates a new manager with the given options.
func (*ProgressManager) DecrementCount ¶
func (pm *ProgressManager) DecrementCount()
DecrementCount decreases the active tracker count.
func (*ProgressManager) NewTracker ¶
func (pm *ProgressManager) NewTracker(tool *tool.Tool) *PrettyProgressTracker
NewTracker creates a progress tracker for a specific tool.
func (*ProgressManager) Stop ¶
func (pm *ProgressManager) Stop()
Stop stops the progress writer explicitly.