diff options
| author | 2026-03-08 14:15:38 +0800 | |
|---|---|---|
| committer | 2026-03-08 14:15:38 +0800 | |
| commit | c75a034d25ca87f3d209a8e82c743b8a7e96573b (patch) | |
| tree | d8cd5befb9d812ab622dcce094c9d30797d6d861 /internal/progress/options.go | |
| parent | *: BestEffortFprintf as linter wants (diff) | |
| signature | No signature | |
internal/progress: Add progress meter
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 +} |
