watcher

package
v0.0.0-...-262d4b5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PubEventMap = map[common.Hash]EventHandler{
				// contains filtered or unexported fields
	}
	PriEventMap = map[common.Hash]EventHandler{
				// contains filtered or unexported fields
	}
)

Functions

func ReadBlockNumberFromFile

func ReadBlockNumberFromFile(filePath string) (*big.Int, error)

func WriteCheckpointBlockNumberToFile

func WriteCheckpointBlockNumberToFile(filePath string, blkNumber *big.Int) error

Types

type EthEventLogWatcher

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

func NewEthEventLogWatcher

func NewEthEventLogWatcher(c *rpc.Client, ethCfg *config.EthCfg, blkFile string, ldb *db.Ldb) (*EthEventLogWatcher, error)

func (*EthEventLogWatcher) CheckLogs

func (logW *EthEventLogWatcher) CheckLogs(blkNumber *big.Int) error

待修改

func (*EthEventLogWatcher) DelKey

func (logW *EthEventLogWatcher) DelKey(key []byte) error

func (*EthEventLogWatcher) Initial

func (logW *EthEventLogWatcher) Initial(events map[common.Hash]EventHandler) error

func (*EthEventLogWatcher) Listen

func (logW *EthEventLogWatcher) Listen()

func (*EthEventLogWatcher) PutByte

func (logW *EthEventLogWatcher) PutByte(key, value []byte) error

func (*EthEventLogWatcher) ReSendGrpcStream

func (logW *EthEventLogWatcher) ReSendGrpcStream() error

GRPC重发检测

func (*EthEventLogWatcher) SetGrpcStreamDB

func (logW *EthEventLogWatcher) SetGrpcStreamDB(isSendOK bool, infoType string, keyIndex string, value []byte) error

func (*EthEventLogWatcher) Stop

func (logW *EthEventLogWatcher) Stop()

type EventHandler

type EventHandler func(logW *EthEventLogWatcher, log *types.Log) error

Jump to

Keyboard shortcuts

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