Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bar ¶
type Bar interface { AddToProgress(p *mpb.Progress) StopWithErrMsg(errMsg string) Stop() }
Bar interface represents progress bar
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress represents a wrapper of github.com/vbauerster/mpb Progress with extra features
func NewProgress ¶
NewProgress creates new Progress instance. It's not possible to reuse instance after *Progress.Wait() method has been called
func NewProgressWithContext ¶
NewProgressWithContext creates new Progress instance. It's not possible to reuse instance after *Progress.Wait() method has been called
type SpinBar ¶
type SpinBar struct {
// contains filtered or unexported fields
}
SpinBar represents a wrapper of github.com/vbauerster/mpb Bar with spinning progress bar that can be canceled, stopped with an error or nil
func NewSpinBar ¶
NewSpinBar returns new instance of SpinBar with title
func (*SpinBar) AddToProgress ¶
func (sb *SpinBar) AddToProgress(p *mpb.Progress)
AddToProgress the spin bar
func (*SpinBar) Cancel ¶
func (sb *SpinBar) Cancel()
Cancel spinning. It will be printed into progress
func (*SpinBar) StopWithErrMsg ¶
StopWithErrMsg stop spinning and print errMsg into progress