service

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package service is the sinner service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainIndexer

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

ChainIndexer indexes message logs for a chain.

func NewChainIndexer

func NewChainIndexer(eventDB db.EventDB, parsers Parsers, fetcher fetcher.ScribeFetcher, config indexerConfig.ChainConfig, refreshRate time.Duration) *ChainIndexer

NewChainIndexer creates a new chain indexer.

func (ChainIndexer) Index

func (c ChainIndexer) Index(ctx context.Context) error

Index indexes all contracts from the config for the current chain.

type Parsers

type Parsers struct {
	// ChainID is the chain these parsers are for.
	ChainID uint32
	// OriginParser parses logs from the origin contract.
	OriginParser sinnerTypes.EventParser
	// DestinationParser parses logs from the execution hub contract.
	DestinationParser sinnerTypes.EventParser
}

Parsers holds all the parsers for a given chain.

type Sinner

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

Sinner parses messages stored in scribe.

func NewSinner

func NewSinner(eventDB db.EventDB, config indexerConfig.Config, handler metrics.Handler) (*Sinner, error)

NewSinner creates a new sinner indexer service.

nolint:gocognit

func (Sinner) Index

func (e Sinner) Index(ctx context.Context) error

Index iterates over each chain backfiller and calls index concurrently on each one.

nolint:cyclop

Jump to

Keyboard shortcuts

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