Documentation ¶
Index ¶
- type AbstractWatcher
- func (watcher *AbstractWatcher) FoundFork(newBlock sdk.Block) bool
- func (watcher *AbstractWatcher) LatestSyncedBlockNum() uint64
- func (watcher *AbstractWatcher) RegisterBlockPlugin(plugin plugin.IBlockPlugin)
- func (watcher *AbstractWatcher) RegisterTxPlugin(plugin plugin.ITxPlugin)
- func (watcher *AbstractWatcher) RegisterTxReceiptPlugin(plugin plugin.ITxReceiptPlugin)
- func (watcher *AbstractWatcher) RunTillExit() error
- func (watcher *AbstractWatcher) RunTillExitFromBlock(startBlockNum uint64) error
- type SyncSignal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractWatcher ¶
type AbstractWatcher struct { Ctx context.Context NewBlockChan chan *structs.RemovableBlock NewTxAndReceiptChan chan *structs.RemovableTxAndReceipt SyncedBlocks *list.List SyncedTxAndReceipts *list.List MaxSynedBlockToKeep int BlockPlugins []plugin.IBlockPlugin TxPlugins []plugin.ITxPlugin TxReceiptPlugins []plugin.ITxReceiptPlugin // contains filtered or unexported fields }
func NewHttpBasedEthWatcher ¶
func NewHttpBasedEthWatcher(ctx context.Context, api string) *AbstractWatcher
func (*AbstractWatcher) FoundFork ¶
func (watcher *AbstractWatcher) FoundFork(newBlock sdk.Block) bool
func (*AbstractWatcher) LatestSyncedBlockNum ¶
func (watcher *AbstractWatcher) LatestSyncedBlockNum() uint64
func (*AbstractWatcher) RegisterBlockPlugin ¶
func (watcher *AbstractWatcher) RegisterBlockPlugin(plugin plugin.IBlockPlugin)
func (*AbstractWatcher) RegisterTxPlugin ¶
func (watcher *AbstractWatcher) RegisterTxPlugin(plugin plugin.ITxPlugin)
func (*AbstractWatcher) RegisterTxReceiptPlugin ¶
func (watcher *AbstractWatcher) RegisterTxReceiptPlugin(plugin plugin.ITxReceiptPlugin)
func (*AbstractWatcher) RunTillExit ¶
func (watcher *AbstractWatcher) RunTillExit() error
start sync from latest block
func (*AbstractWatcher) RunTillExitFromBlock ¶
func (watcher *AbstractWatcher) RunTillExitFromBlock(startBlockNum uint64) error
start sync from given block 0 means start from latest block
type SyncSignal ¶
type SyncSignal struct {
// contains filtered or unexported fields
}
func (*SyncSignal) Done ¶
func (s *SyncSignal) Done()
func (*SyncSignal) Permit ¶
func (s *SyncSignal) Permit()
func (*SyncSignal) WaitDone ¶
func (s *SyncSignal) WaitDone()
func (*SyncSignal) WaitPermission ¶
func (s *SyncSignal) WaitPermission()
Click to show internal directories.
Click to hide internal directories.