progress

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultMessageDone

func GetDefaultMessageDone() string

func GetDefaultStyle

func GetDefaultStyle() string

func SetDefaultMessageDone

func SetDefaultMessageDone(message string)

func SetDefaultStyle

func SetDefaultStyle(style string)

Types

type Bar

type Bar interface {
	Current() int64
	Completed() bool
	Reset(total, current int64)
	ResetDefined(current int64)
	Done()

	Increment(n int)
	Increment64(n int64)

	NewWorker() errors.Error
	NewWorkerTry() bool
	DeferWorker()
	DeferMain(dropBar bool)

	WaitAll() errors.Error

	GetBarMPB() *mpb.Bar
}

type ProgressBar

type ProgressBar interface {
	GetMPB() *mpb.Progress
	SetMaxThread(maxSimultaneous int)
	SetContext(ctx context.Context)

	UnicProcessInit()
	UnicProcessWait() errors.Error
	UnicProcessNewWorker() errors.Error
	UnicProcessDeferWorker()
	UnicProcessDefer()

	NewBar(total int64, options ...mpb.BarOption) Bar

	NewBarETA(name string, total int64, job string, parent Bar) Bar
	NewBarCounter(name string, total int64, job string, parent Bar) Bar
	NewBarKBits(name string, total int64, job string, parent Bar) Bar

	NewBarSimpleETA(name string, total int64) Bar
	NewBarSimpleCounter(name string, total int64) Bar
	NewBarSimpleKBits(name string, total int64) Bar
}

func NewProgressBar

func NewProgressBar(options ...mpb.ContainerOption) ProgressBar

func NewProgressBarWithContext added in v1.3.0

func NewProgressBarWithContext(ctx context.Context, options ...mpb.ContainerOption) ProgressBar

Jump to

Keyboard shortcuts

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