router

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterchainRouter

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

func New

func New(logger logrus.FieldLogger, repo *repo.Repo, ledger ledger.Ledger, peerMgr peermgr.PeerManager, quorum uint64) (*InterchainRouter, error)

func (*InterchainRouter) AddPier

func (router *InterchainRouter) AddPier(key string) (chan *pb.InterchainTxWrapper, error)

func (*InterchainRouter) GetBlockHeader

func (router *InterchainRouter) GetBlockHeader(begin, end uint64, ch chan<- *pb.BlockHeader) error

func (*InterchainRouter) GetInterchainTxWrapper

func (router *InterchainRouter) GetInterchainTxWrapper(pid string, begin, end uint64, ch chan<- *pb.InterchainTxWrapper) error

func (*InterchainRouter) PutBlockAndMeta

func (router *InterchainRouter) PutBlockAndMeta(block *pb.Block, meta *pb.InterchainMeta)

func (*InterchainRouter) RemovePier

func (router *InterchainRouter) RemovePier(key string)

func (*InterchainRouter) Start

func (router *InterchainRouter) Start() error

func (*InterchainRouter) Stop

func (router *InterchainRouter) Stop() error

type Router

type Router interface {
	// Start starts the router module
	Start() error

	// Stop
	Stop() error

	// PutBlock
	PutBlockAndMeta(*pb.Block, *pb.InterchainMeta)

	// AddPier
	AddPier(id string) (chan *pb.InterchainTxWrapper, error)

	// RemovePier
	RemovePier(id string)

	// GetBlockHeader
	GetBlockHeader(begin, end uint64, ch chan<- *pb.BlockHeader) error

	GetInterchainTxWrapper(pid string, begin, end uint64, ch chan<- *pb.InterchainTxWrapper) error
}

Jump to

Keyboard shortcuts

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