Help us shape the future of Go! Take the 2026 Go Developer Survey

crawler

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssetTypeERC20   = "ERC20"
	AssetTypeERC721  = "ERC721"
	AssetTypeERC1155 = "ERC1155"
)
View Source
const (
	BackfillCollection = "backfill_collection"
)

---------------------------------------------- Task ----------------------------------------------

Variables

This section is empty.

Functions

func AddBackfillCrawlerTask

func AddBackfillCrawlerTask(ctx context.Context, sugar *zap.Logger, client *ethclient.Client, db *sql.DB, chain *models.Chain, c *models.GetCrawlingBackfillCrawlerRow, queueClient *asynq.Client) error

func CrawlSupportedChains

func CrawlSupportedChains(ctx context.Context, logger *zap.Logger, db *sql.DB, rdb *redis.Client) error

func FilterEvents

func FilterEvents(ctx context.Context, sugar *zap.Logger, db *sql.DB, client *ethclient.Client,
	chain *models.Chain, rdb *redis.Client, receipts utypes.Receipts) error

func InitBackfillProcessor

func InitBackfillProcessor(ctx context.Context, logger *zap.Logger, db *sql.DB, rdb *redis.Client, queueClient *asynq.Client, config server.Config) error

func NewBackfillCollectionTask

func NewBackfillCollectionTask(bf *models.GetCrawlingBackfillCrawlerRow) (*asynq.Task, error)

func ProcessCrawlingBackfillCollection

func ProcessCrawlingBackfillCollection(ctx context.Context, sugar *zap.Logger, db *sql.DB, queueClient *asynq.Client) error

func ProcessLatestBlocks

func ProcessLatestBlocks(ctx context.Context, sugar *zap.Logger, client *ethclient.Client, db *sql.DB, chain *models.Chain, rdb *redis.Client) error

func ProcessNewChainAssets

func ProcessNewChainAssets(ctx context.Context, logger *zap.Logger, rdb *redis.Client) error

func ProcessNewChains

func ProcessNewChains(ctx context.Context, logger *zap.Logger, rdb *redis.Client, db *sql.DB) error

func StartChainCrawler

func StartChainCrawler(ctx context.Context, sugar *zap.Logger, client *ethclient.Client, db *sql.DB, chain *models.Chain, rdb *redis.Client)

func StartWorker

func StartWorker(db *sql.DB, rdb *redis.Client, queueClient *asynq.Client, config server.Config)

Types

type BackfillProcessor

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

BackfillProcessor implements asynq.Handler interface.

func NewBackfillProcessor

func NewBackfillProcessor(sugar *zap.Logger, ethClient *ethclient.Client, db *sql.DB, chain *models.Chain, rdb *redis.Client, config server.Config) *BackfillProcessor

func (*BackfillProcessor) ProcessTask

func (processor *BackfillProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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