Documentation ¶
Overview ¶
Package progress implements progress indicators, which are used during state enforcement while running actions and plugins to estimate progress and show completion percentage to the user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
Console is a console-based progress indicator
func NewConsole ¶
func NewConsole() *Console
NewConsole creates a new console-based progress indicator
func (*Console) Advance ¶
func (progressConsole *Console) Advance()
Advance advances progress indicator by one step
func (Console) GetCompletionPercent ¶
func (count Console) GetCompletionPercent() int
type Indicator ¶
type Indicator interface { // SetTotal should be called to initialize progress indicator with 'total' steps SetTotal(total int) // Advance should be called to advance progress indicator by 1 step Advance() // Done should be called when you are done using progress indicator (e.g. done, or error happened in the middle) Done(success bool) // IsDone method should be called to check if progress indicator has already been marked as Done() IsDone() bool // GetCompletionPercent should be called to retrieve % of completion as integer. Note that you should rely on IsDone() instead of relying on 100% returned by this method GetCompletionPercent() int }
Indicator is an interface which represents progress bar indicator
type Noop ¶
type Noop struct {
// contains filtered or unexported fields
}
Noop is a mock progress indicator which prints nothing
func (*Noop) Advance ¶
func (progressNoop *Noop) Advance()
Advance advances progress indicator by one step
func (Noop) GetCompletionPercent ¶
func (count Noop) GetCompletionPercent() int
Click to show internal directories.
Click to hide internal directories.