...
1 package progress
2
3 import (
4 "io"
5 "time"
6 )
7
8
9
10 type Writer interface {
11 AppendTracker(tracker *Tracker)
12 AppendTrackers(trackers []*Tracker)
13 IsRenderInProgress() bool
14 Length() int
15 LengthActive() int
16 LengthDone() int
17 LengthInQueue() int
18 Log(msg string, a ...interface{})
19 SetAutoStop(autoStop bool)
20 SetMessageWidth(width int)
21 SetNumTrackersExpected(numTrackers int)
22 SetOutputWriter(output io.Writer)
23 SetSortBy(sortBy SortBy)
24 SetStyle(style Style)
25 SetTrackerLength(length int)
26 SetTrackerPosition(position Position)
27
28 ShowETA(show bool)
29
30 ShowOverallTracker(show bool)
31
32 ShowPercentage(show bool)
33
34 ShowTime(show bool)
35
36 ShowTracker(show bool)
37
38 ShowValue(show bool)
39 SetUpdateFrequency(frequency time.Duration)
40 Stop()
41 Style() *Style
42 Render()
43 }
44
45
46 func NewWriter() Writer {
47 return &Progress{}
48 }
49
View as plain text