pkg

package
v0.0.0-...-a9402ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CompletedEvent = "complete!"

CompletedEvent indicate the process completed

Variables

View Source
var RenderProgressBars bool

RenderProgressBars indicate if we need to display progress in UI

Functions

This section is empty.

Types

type Progress

type Progress struct {
	Name string
	Bar  *uiprogress.Bar

	State string
	// contains filtered or unexported fields
}

Progress define the progress on command execution

func (*Progress) SetText

func (progress *Progress) SetText(text string)

SetText define text to display during progress

type UIProgressCoordinator

type UIProgressCoordinator struct {
	// contains filtered or unexported fields
}

UIProgressCoordinator coortinate display of progress in UI

func NewProgressCoordinator

func NewProgressCoordinator() *UIProgressCoordinator

NewProgressCoordinator create a new progress coordinator UI

func (*UIProgressCoordinator) AddEvent

func (c *UIProgressCoordinator) AddEvent(progressName string, eventName string)

AddEvent add an new event in the progress UI

func (*UIProgressCoordinator) CompleteProgress

func (c *UIProgressCoordinator) CompleteProgress(nodeName string)

CompleteProgress sends an completed event

func (*UIProgressCoordinator) StartProgress

func (c *UIProgressCoordinator) StartProgress(name string, steps int)

StartProgress start the progress UI

func (*UIProgressCoordinator) Wait

func (c *UIProgressCoordinator) Wait()

Wait temporary stop the progress UI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL