watcher

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: AGPL-3.0 Imports: 16 Imported by: 2

Documentation

Overview

Contract watcher is built with a more generic interface that allows offloading more of the operational logic to the transformers, allowing them to act more dynamically Built to work primarily with the contract_watcher packaging

Index

Constants

View Source
const NoNewDataPause = time.Second * 7

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractWatcher

type ContractWatcher struct {
	Transformers []transformer.ContractTransformer
	DB           *postgres.DB
	BlockChain   core.BlockChain
}

func NewContractWatcher

func NewContractWatcher(db *postgres.DB, bc core.BlockChain) ContractWatcher

func (*ContractWatcher) AddTransformers

func (watcher *ContractWatcher) AddTransformers(inits interface{}) error

func (*ContractWatcher) Execute

func (watcher *ContractWatcher) Execute() error

type EventWatcher

type EventWatcher struct {
	LogDelegator logs.ILogDelegator
	LogExtractor logs.ILogExtractor
	// contains filtered or unexported fields
}

func NewEventWatcher

func NewEventWatcher(db *postgres.DB, bc core.BlockChain) EventWatcher

func (*EventWatcher) AddTransformers

func (watcher *EventWatcher) AddTransformers(initializers []transformer.EventTransformerInitializer) error

Adds transformers to the watcher so that their logs will be extracted and delegated.

func (*EventWatcher) Execute

func (watcher *EventWatcher) Execute(recheckHeaders constants.TransformerExecution) error

Extracts and delegates watched log events.

type StorageWatcher

type StorageWatcher struct {
	StorageFetcher fetcher.IStorageFetcher
	Queue          storage.IStorageQueue
	Transformers   map[common.Address]transformer.StorageTransformer
	// contains filtered or unexported fields
}

func NewStorageWatcher

func NewStorageWatcher(fetcher fetcher.IStorageFetcher, db *postgres.DB) StorageWatcher

func (StorageWatcher) AddTransformers

func (storageWatcher StorageWatcher) AddTransformers(initializers []transformer.StorageTransformerInitializer)

func (StorageWatcher) Execute

func (storageWatcher StorageWatcher) Execute(rows chan utils.StorageDiffRow, errs chan error, queueRecheckInterval time.Duration)

Jump to

Keyboard shortcuts

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