catchup

package
v1.2.1-mainnet Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 17 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 WithBenchmark

func WithBenchmark(benchmark bool) 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 *mysql.MysqlStore,
	elm election.LeaderManager, opts ...SyncOption) *Syncer

func (*Syncer) Close

func (s *Syncer) Close()

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