Documentation ¶
Index ¶
- type Observer
- func (ob *Observer) Alert()
- func (ob *Observer) DeleteBlockAndPackages(height int64) error
- func (ob *Observer) Fetch(startHeight int64)
- func (ob *Observer) GetCurrentBlockLog() (*model.BlockLog, error)
- func (ob *Observer) Prune()
- func (ob *Observer) SaveBlockAndPackages(blockLog *model.BlockLog, packages []interface{}) error
- func (ob *Observer) Start()
- func (ob *Observer) UpdateConfirmedNum(height int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observer ¶
func NewObserver ¶
NewObserver returns the observer instance
func (*Observer) Alert ¶
func (ob *Observer) Alert()
Alert sends alerts to tg group if there is no new block fetched in a specific time
func (*Observer) DeleteBlockAndPackages ¶
DeleteBlockAndPackages deletes the block and txs of the given height
func (*Observer) GetCurrentBlockLog ¶
GetCurrentBlockLog returns the highest block log
func (*Observer) SaveBlockAndPackages ¶
SaveBlockAndPackages saves block and packages to database
func (*Observer) UpdateConfirmedNum ¶
UpdateConfirmedNum updates confirmation number of cross-chain packages.
Click to show internal directories.
Click to hide internal directories.