progress

package
v0.0.7-beta Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	Initialized          bool
	Total                uint64 // Total value for progress
	BlockRangeStartBlock uint64 // BlockRangeStartBlock value for start block for current request
	BlockRangeEndBlock   uint64 // BlockRangeEndBlock value for end block for current request

	Cur uint64 // current progress
	// contains filtered or unexported fields
}

func (*Bar) Finish

func (bar *Bar) Finish()

func (*Bar) NewOption

func (bar *Bar) NewOption(cur, blockRangeStartBlock, blockRangeEndBlock uint64)

func (*Bar) Play

func (bar *Bar) Play(cur uint64, moduleName string)

type ModuleName

type ModuleName string

type ModuleProgressBar

type ModuleProgressBar struct {
	Bars map[ModuleName]*Bar
}

type Tracker

type Tracker struct {
	LastBlock uint64
	// contains filtered or unexported fields
}

func NewProgressTracker

func NewProgressTracker() *Tracker

func (*Tracker) BlockProcessed

func (t *Tracker) BlockProcessed(block *bstream.Block, delta time.Duration)

func (*Tracker) StartTracking

func (t *Tracker) StartTracking(ctx context.Context)

Jump to

Keyboard shortcuts

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