catchup

package
v1.3.3-testnet Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncOption

type SyncOption func(*Syncer)

functional options for syncer

func WithAdaptive

func WithAdaptive(adaptive bool) SyncOption

func WithBenchmark

func WithBenchmark(benchmark bool) SyncOption

func WithEpochFrom

func WithEpochFrom(epochFrom uint64) SyncOption

func WithEpochTo

func WithEpochTo(epochTo uint64) SyncOption

func WithMaxDbRows

func WithMaxDbRows(dbRows int) SyncOption

func WithMinBatchDbRows

func WithMinBatchDbRows(dbRows int) SyncOption

func WithWorkers

func WithWorkers(workers []*worker) SyncOption

type Syncer

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

Syncer accelerates core space epoch data catch-up using concurrently workers. Specifically, each worker will be dispatched as round-robin load balancing.

func MustNewSyncer

func MustNewSyncer(cfx sdk.ClientOperator, db store.StackOperable, opts ...SyncOption) *Syncer

func (*Syncer) Close

func (s *Syncer) Close()

func (*Syncer) Range

func (s *Syncer) Range() types.RangeUint64

func (*Syncer) Sync

func (s *Syncer) Sync(ctx context.Context)

Jump to

Keyboard shortcuts

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