Documentation
¶
Index ¶
- func BuildProgressBar(currentSteps, totalSteps int32, status Status, width int) string
- func CalculateETA(elapsed time.Duration, currentSteps, totalSteps int32) time.Duration
- func FormatTime(d time.Duration) string
- type Status
- type Tracker
- func (t *Tracker) Finish()
- func (t *Tracker) GetCurrentSteps() int32
- func (t *Tracker) GetElapsed() time.Duration
- func (t *Tracker) GetStartTime() time.Time
- func (t *Tracker) GetStatusMessage() string
- func (t *Tracker) GetTotalSteps() int32
- func (t *Tracker) HasError() bool
- func (t *Tracker) IncrementStep(statusMsg string)
- func (t *Tracker) SetError()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProgressBar ¶
BuildProgressBar creates a Unicode progress bar string Ported from existing buildProgressBar and currentProgressBar functions
func CalculateETA ¶
CalculateETA estimates time remaining based on linear extrapolation Ported from existing calculateETA function
func FormatTime ¶
FormatTime formats a duration as MM:SS Ported from existing formatTime function
Types ¶
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker encapsulates all progress tracking state with thread-safe access
func NewTracker ¶
NewTracker creates a new progress tracker
func (*Tracker) GetCurrentSteps ¶
GetCurrentSteps returns the current step count
func (*Tracker) GetElapsed ¶
GetElapsed returns elapsed time (uses endTime if finished, otherwise calculates from now)
func (*Tracker) GetStartTime ¶
GetStartTime returns when tracking started
func (*Tracker) GetStatusMessage ¶
GetStatusMessage returns the current status message
func (*Tracker) GetTotalSteps ¶
GetTotalSteps returns the total step count
func (*Tracker) IncrementStep ¶
IncrementStep increments the progress counter and updates status message