router

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 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.MerkleWrapper, error)

func (*InterchainRouter) GetMerkleWrapper

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

func (*InterchainRouter) PutBlock

func (router *InterchainRouter) PutBlock(block *pb.Block)

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
	PutBlock(*pb.Block)

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

	// RemovePier
	RemovePier(id string)

	// GetMerkleWrapper
	GetMerkleWrapper(pid string, begin, end uint64, ch chan<- *pb.MerkleWrapper) error
}

Jump to

Keyboard shortcuts

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