aboutsummaryrefslogtreecommitdiff
path: root/internal/progress/options.go
blob: 320b893467d75dd21b660ebf48de8927476bc943 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package progress

import (
	"time"

	"lindenii.org/go/furgit/common/iowrap"
)

// Options configures one progress meter.
type Options struct {
	Writer iowrap.WriteFlusher

	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
}