Documentation
¶
Index ¶
- func GetInitBatches(numBatch int, genesisBlock *big.Int, latestBlock *big.Int) []types.BatchStatus
- type Indexer
- func (indexer *Indexer) CreateIndexData(blockDetail *types.BLockDetail) ([]*types.AddressIndex, *types.BlockIndex)
- func (indexer *Indexer) FetchAndProcess(blockNumber *big.Int) error
- func (indexer *Indexer) FirstIndex()
- func (indexer *Indexer) IpcUpdated(ipcPath string)
- func (indexer *Indexer) Name() string
- func (indexer *Indexer) ProcessBlock(blockDetail *types.BLockDetail, isBatch bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInitBatches ¶
GetInitBatches create batch initially
Types ¶
type Indexer ¶
type Indexer struct { IndexRepo repository.IndexRepo BatchRepo repository.BatchRepo // contains filtered or unexported fields }
Indexer fetch data from blockchain and store in a repository
func NewIndexer ¶
func NewIndexer(IndexRepo repository.IndexRepo, BatchRepo repository.BatchRepo, wa watcher.Watcher) Indexer
NewIndexer create an Indexer
func (*Indexer) CreateIndexData ¶
func (indexer *Indexer) CreateIndexData(blockDetail *types.BLockDetail) ([]*types.AddressIndex, *types.BlockIndex)
CreateIndexData transforms blockchain data to our index data
func (*Indexer) FetchAndProcess ¶
FetchAndProcess fetch a block data from blockchain and process it
func (*Indexer) FirstIndex ¶ added in v1.0.0
func (indexer *Indexer) FirstIndex()
FirstIndex Entry point
func (*Indexer) IpcUpdated ¶
IpcUpdated implements IpcSubscriber interface
func (*Indexer) ProcessBlock ¶
func (indexer *Indexer) ProcessBlock(blockDetail *types.BLockDetail, isBatch bool) error
ProcessBlock transform blockchain data to our index structure and save it to repo
Click to show internal directories.
Click to hide internal directories.