utils

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockProgress

func MockProgress() (*Progress, *Bar)

func MountPathClean added in v0.14.3

func MountPathClean(mountPath string) string

MountPathClean cleans the path for mountPath

Types

type Bar

type Bar struct {
	*mpb.Bar
	// contains filtered or unexported fields
}

func (*Bar) Done

func (b *Bar) Done()

func (*Bar) IncrTotal

func (b *Bar) IncrTotal(n int64)

func (*Bar) SetTotal

func (b *Bar) SetTotal(total int64)

type DoubleSpinner

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

func (*DoubleSpinner) Current

func (s *DoubleSpinner) Current() (int64, int64)

func (*DoubleSpinner) Done

func (s *DoubleSpinner) Done()

func (*DoubleSpinner) IncrInt64

func (s *DoubleSpinner) IncrInt64(size int64)

type Progress

type Progress struct {
	*mpb.Progress
	Quiet bool
	// contains filtered or unexported fields
}

func NewProgress

func NewProgress(quiet, showSpeed bool) *Progress

func (*Progress) AddByteSpinner

func (p *Progress) AddByteSpinner(name string) *Bar

func (*Progress) AddCountBar

func (p *Progress) AddCountBar(name string, total int64) *Bar

func (*Progress) AddCountSpinner

func (p *Progress) AddCountSpinner(name string) *Bar

func (*Progress) AddDoubleSpinner

func (p *Progress) AddDoubleSpinner(name string) *DoubleSpinner

func (*Progress) Done

func (p *Progress) Done()

Jump to

Keyboard shortcuts

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