watch

package
v0.0.0-...-da200cc Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

README

About

Work In Progress

Documentation

Index

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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