diff options
Diffstat (limited to 'internal/progress/options.go')
| -rw-r--r-- | internal/progress/options.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/progress/options.go b/internal/progress/options.go new file mode 100644 index 00000000..d7c08894 --- /dev/null +++ b/internal/progress/options.go @@ -0,0 +1,22 @@ +package progress + +import ( + "io" + "time" +) + +// Options configures one progress meter. +type Options struct { + Writer io.Writer + Flush func() error + + Title string + Total uint64 + + // Delay suppresses progress output until Delay has elapsed since Start. + Delay time.Duration + // Sparse forces one final 100% line at Stop when the caller sampled updates. + Sparse bool + // Throughput appends ", <total> | <rate>/s" and refreshes rate every 500ms. + Throughput bool +} |
