Documentation ¶
Overview ¶
Package service runs the scribe 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 is an indexer that fetches logs for a chain. It aggregates logs from a slice of ContractIndexers.
func NewChainIndexer ¶
func NewChainIndexer(eventDB db.EventDB, client []backend.ScribeBackend, chainConfig config.ChainConfig, handler metrics.Handler) (*ChainIndexer, error)
NewChainIndexer creates a new indexer for a chain. This is done by passing through all the function parameters into the ChainIndexer struct, as well as iterating through all the contracts in the chain config & creating ContractIndexers for each contract.
func (*ChainIndexer) Index ¶
func (c *ChainIndexer) Index(parentContext context.Context) error
Index iterates over each contract indexer and calls Index concurrently on each one. If `onlyOneBlock` is true, the indexer will only index the block at `currentBlock`.
func (*ChainIndexer) IndexToBlock ¶
func (c *ChainIndexer) IndexToBlock(parentContext context.Context, configStart uint64, configEnd *uint64, indexer *indexer.Indexer) error
IndexToBlock takes a contract indexer and indexes a contract up until it reaches the livefill threshold. This function should be generally used for calling a indexer with a single contract.
type Scribe ¶
type Scribe struct {
// contains filtered or unexported fields
}
Scribe is a live scribe that logs all event data.