tasks

package
v0.0.0-...-4f62844 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITaskBase

type ITaskBase interface {
	Job() (bool, error)
}

type SyncChainLogs

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

func NewSyncChainLogs

func NewSyncChainLogs(syncStartBlock int64,
	addressRpc string,
	fnCurrSyncBlock func() (int64, error),
	fnSetCurrSyncBlock func(int64) error) *SyncChainLogs

syncBlockKey string,

func (*SyncChainLogs) AddContracts

func (p *SyncChainLogs) AddContracts(contracts ...common.Address)

func (*SyncChainLogs) AddTopics

func (obj *SyncChainLogs) AddTopics(tops ...common.Hash)

func (*SyncChainLogs) AddVlogHandler

func (p *SyncChainLogs) AddVlogHandler(handler VlogManager)

func (*SyncChainLogs) InitCfg

func (obj *SyncChainLogs) InitCfg(
	addressSer string,
	fnSyncNumber func() (int64, error),
	fnSetSyncNumber func(int64) error,
	fnEventLogs func(types.Log) error)

func (*SyncChainLogs) Run

func (obj *SyncChainLogs) Run()

func (*SyncChainLogs) SyncLogsData

func (obj *SyncChainLogs) SyncLogsData(curNumber int64)

type TaskBase

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

func NewTaskBase

func NewTaskBase(_step int, _job ITaskBase) *TaskBase

func (*TaskBase) Run

func (obj *TaskBase) Run()

step int, fuJob func() error

type VlogManager

type VlogManager struct {
	Address       string
	Event         common.Hash
	FunLogHandler func(types.Log)
}

Jump to

Keyboard shortcuts

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