syncer

package
v0.0.0-...-c772d2a Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainEventReceiver

type ChainEventReceiver interface {
	Connect()
	EventChannel() chan int64 // Maybe you will pass a more complicate object in the channel

}

ChainEventReceiver is the pushing way to receive the latest sequencer

type ChainOperator

type ChainOperator interface {
	QueryHeight() (int64, error)
}

ChainOperator is the pulling way to query the latest sequencer and txs.

type OgChainSyncer

type OgChainSyncer struct {

	// table: op
	MaxSyncedHeight int64
	ChainOperator   ChainOperator
	InfoReceiver    ChainEventReceiver
	// contains filtered or unexported fields
}

func (*OgChainSyncer) Name

func (o *OgChainSyncer) Name() string

func (*OgChainSyncer) QueryHeight

func (o *OgChainSyncer) QueryHeight() (int64, error)

func (*OgChainSyncer) Start

func (o *OgChainSyncer) Start()

func (*OgChainSyncer) Stop

func (o *OgChainSyncer) Stop()

type WebsocketInfoReceiver

type WebsocketInfoReceiver struct {
}

func (WebsocketInfoReceiver) Name

func (w WebsocketInfoReceiver) Name() string

func (WebsocketInfoReceiver) Start

func (w WebsocketInfoReceiver) Start()

func (WebsocketInfoReceiver) Stop

func (w WebsocketInfoReceiver) Stop()

Jump to

Keyboard shortcuts

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