observer

package
v1.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

type Observer struct {
	DB          *gorm.DB
	Config      *util.Config
	BscExecutor *bsc.Executor
}

func NewObserver

func NewObserver(db *gorm.DB, cfg *util.Config, bscExecutor *bsc.Executor) *Observer

func (*Observer) Alert

func (ob *Observer) Alert()

func (*Observer) DeleteBlockAndTxs

func (ob *Observer) DeleteBlockAndTxs(height int64) error

func (*Observer) Fetch

func (ob *Observer) Fetch(startHeight int64)

func (*Observer) GetCurrentBlockLog

func (ob *Observer) GetCurrentBlockLog() *model.BlockLog

func (*Observer) Prune

func (ob *Observer) Prune()

func (*Observer) SaveBlockAndTxs

func (ob *Observer) SaveBlockAndTxs(blockLog *model.BlockLog, txLogs []interface{}) error

func (*Observer) Start

func (ob *Observer) Start()

func (*Observer) UpdateConfirmedNum

func (ob *Observer) UpdateConfirmedNum(height int64) error

Jump to

Keyboard shortcuts

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