syncer

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppchainHandler added in v1.4.0

type AppchainHandler func() error

type IBTPHandler

type IBTPHandler func(ibtp *pb.IBTP)

type RecoverUnionHandler added in v1.4.0

type RecoverUnionHandler func(ibtp *pb.IBTP) (*rpcx.Interchain, error)

type Syncer

type Syncer interface {
	// Start starts the service of syncer
	Start() error

	// Stop stops the service of syncer
	Stop() error

	RegisterIBTPHandler(handler IBTPHandler) error

	RegisterAppchainHandler(handler AppchainHandler) error

	RegisterRecoverHandler(handleRecover RecoverUnionHandler) error
}

type WrapperSyncer

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

WrapperSyncer represents the necessary data for sync tx wrappers from bitxhub

func New

func New(ag agent.Agent, lite lite.Lite, storage storage.Storage, config *repo.Config) (*WrapperSyncer, error)

New creates instance of WrapperSyncer given agent interacting with bitxhub, validators addresses of bitxhub and local storage

func (*WrapperSyncer) RegisterAppchainHandler added in v1.4.0

func (syncer *WrapperSyncer) RegisterAppchainHandler(handler AppchainHandler) error

func (*WrapperSyncer) RegisterIBTPHandler

func (syncer *WrapperSyncer) RegisterIBTPHandler(handler IBTPHandler) error

func (*WrapperSyncer) RegisterRecoverHandler added in v1.4.0

func (syncer *WrapperSyncer) RegisterRecoverHandler(handleRecover RecoverUnionHandler) error

func (*WrapperSyncer) Start

func (syncer *WrapperSyncer) Start() error

Start implements Syncer

func (*WrapperSyncer) Stop

func (syncer *WrapperSyncer) Stop() error

Stop implements Syncer

Directories

Path Synopsis
Package mock_syncer is a generated GoMock package.
Package mock_syncer is a generated GoMock package.

Jump to

Keyboard shortcuts

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