workers

package
v0.0.0-...-edcad5e Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEOF = errors.New("no more planned blocks")

Functions

func NewCrawlerPlanner

func NewCrawlerPlanner(
	log *zap.SugaredLogger,
	chain common.Chain,
	enable bool,
	blockConfirmations int64,
	inmemStorage *storage.Storage, nodePool *blockchain.NodePool, duration time.Duration) (*crawlPlanner, error)

NewCrawlerPlanner returns new crawler planner instance with given context.

Types

type EvmCrawler

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

EvmCrawler gets trade logs, adding the information about USD equivalent on each trade.

func NewEvmCrawler

func NewEvmCrawler(log *zap.SugaredLogger,
	chain common.Chain,
	enable bool,
	storage *storage.Storage,
	fromBlock int64,
	db db.DB,
	tokenFormatter blockchain.TokenAmountFormatterInterface,
	maxWorkers int,
	maxBlockForWorker int64,
	timeout time.Duration,
	blockTimeResolver blockchain.BlockTimeResolverInterface,
	tokenRate tokenrate.TokenUsdtRateProvider,
	topic topic.Topic,
	nodePool *blockchain.NodePool,
	tradeTable string,
	transferTable string,
) *EvmCrawler

NewEvmCrawler create a new Crawler instance.

func (*EvmCrawler) Init

func (c *EvmCrawler) Init() error

func (*EvmCrawler) Run

func (c *EvmCrawler) Run() error

Jump to

Keyboard shortcuts

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