synchronizer

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MOONSTREAM_DB_V3_CONTROLLER_API               string = "https://mdb-v3-api.moonstream.to"
	MOONSTREAM_DB_V3_CONTROLLER_SEER_ACCESS_TOKEN string
)

Functions

func CheckVariablesForSynchronizer

func CheckVariablesForSynchronizer() error

func CustomersLatestBlocks

func CustomersLatestBlocks(customerDBConnections map[string]CustomerDBConnection, blockchain string) (map[string]uint64, error)

func GetDBConnection

func GetDBConnection(uuid string) (string, error)

Types

type CustomerDBConnection

type CustomerDBConnection struct {
	Uri string

	Pgx *indexer.PostgreSQLpgx
}

type Synchronizer

type Synchronizer struct {
	Client          seer_blockchain.BlockchainClient
	StorageInstance storage.Storer
	// contains filtered or unexported fields
}

func NewSynchronizer

func NewSynchronizer(blockchain, baseDir string, startBlock, endBlock, batchSize uint64, timeout int, threads int) (*Synchronizer, error)

NewSynchronizer creates a new synchronizer instance with the given blockchain handler.

func (*Synchronizer) HistoricalSyncRef

func (d *Synchronizer) HistoricalSyncRef(customerDbUriFlag string, addresses []string, customerIds []string, batchSize uint64, autoJobs bool) error

func (*Synchronizer) ReadAbiJobsFromDatabase

func (d *Synchronizer) ReadAbiJobsFromDatabase(blockchain string) ([]indexer.AbiJob, error)

func (*Synchronizer) Start

func (d *Synchronizer) Start(customerDbUriFlag string)

func (*Synchronizer) StartBlockLookUp

func (d *Synchronizer) StartBlockLookUp(customerDBConnections map[string]CustomerDBConnection, blockchain string, blockShift int64) (uint64, error)

func (*Synchronizer) SyncCycle

func (d *Synchronizer) SyncCycle(customerDbUriFlag string) (bool, error)

Jump to

Keyboard shortcuts

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