progresslogger

package
v0.15.18 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockProgressTracker

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

BlockProgressTracker tracks the progress of a migration by block number.

func NewBlockProgressTracker

func NewBlockProgressTracker(
	logger utils.SimpleLogger,
	totalBlocks uint64,
	initialCompletedBlocks uint64,
) *BlockProgressTracker

NewBlockProgressTracker creates a new progress tracker for block-based migrations. initialCompletedBlocks allows resuming from a previous migration state.

func (*BlockProgressTracker) Elapsed

func (t *BlockProgressTracker) Elapsed() time.Duration

func (*BlockProgressTracker) IncrementCompletedBlocks

func (t *BlockProgressTracker) IncrementCompletedBlocks(amount uint64)

IncrementCompletedBlocks increments the completed blocks counter by the specified amount. Safe to call from multiple goroutines concurrently.

func (*BlockProgressTracker) LogProgress

func (t *BlockProgressTracker) LogProgress()

LogProgress logs the progress of the migration.

Jump to

Keyboard shortcuts

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