indexer

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyParameters

func ApplyParameters(query string, params ...interface{}) string

applyParameters applies a set of parameters into a SQL statement in a manner that will be safe for execution. Note that this should only be used in the context of blocks, transactions, and logs - beyond the datatypes used in those datatypes, safety is not guaranteed.

func IndexGenesis

func IndexGenesis(cfg *config.Config, db *sql.DB, indexers []Indexer, mut *sync.RWMutex) error

func ProcessDataFeed

func ProcessDataFeed(csConsumer transports.Consumer, txFeed *txfeed.TxFeed, db *sql.DB, quit <-chan struct{}, eip155Block, homesteadBlock uint64, mut *sync.RWMutex, mempoolSlots int, indexers []Indexer, hc *HealthCheck, memTxThreshold int64, rhf chan *rpc.HeightRecord, chainid uint64)

Types

type BlockIndexer

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

func (*BlockIndexer) Index

func (indexer *BlockIndexer) Index(pb *delivery.PendingBatch) ([]string, error)

type HealthCheck added in v1.0.6

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

func (*HealthCheck) Healthy added in v1.0.6

func (hc *HealthCheck) Healthy() rpc.HealthStatus

type Indexer

type Indexer interface {
	Index(*delivery.PendingBatch) ([]string, error)
}

func NewBlockIndexer

func NewBlockIndexer(chainid uint64) Indexer

func NewLogIndexer

func NewLogIndexer(chainid uint64) Indexer

func NewTxIndexer

func NewTxIndexer(chainid, eip155block, homesteadblock uint64, hasMempool bool) Indexer

type LogIndexer

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

func (*LogIndexer) Index

func (indexer *LogIndexer) Index(pb *delivery.PendingBatch) ([]string, error)

type TxIndexer

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

func (*TxIndexer) Index

func (indexer *TxIndexer) Index(pb *delivery.PendingBatch) ([]string, error)

Jump to

Keyboard shortcuts

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