router

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

	// Stop
	Stop() error

	//Broadcast broadcasts the registered appchain ids to the union network
	Broadcast(id string) error

	//Route sends ibtp to the union pier in target relay chain
	Route(ibtp *pb.IBTP) error

	QueryInterchain(bxhID, serviceID string) (*pb.Interchain, error)

	QueryIBTP(id string, isReq bool) (*pb.IBTP, error)
}

type UnionRouter

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

func New

func New(peermgr peermgr.PeerManager, logger logrus.FieldLogger) *UnionRouter

func (*UnionRouter) Broadcast

func (u *UnionRouter) Broadcast(bxhID string) error

Broadcast broadcasts current BitXHub Chain ID to the union network

func (*UnionRouter) QueryIBTP added in v1.13.0

func (u *UnionRouter) QueryIBTP(id string, isReq bool) (*pb.IBTP, error)

func (*UnionRouter) QueryInterchain added in v1.13.0

func (u *UnionRouter) QueryInterchain(bxhID, serviceID string) (*pb.Interchain, error)

func (*UnionRouter) Route

func (u *UnionRouter) Route(ibtp *pb.IBTP) error

Route sends ibtp to the union pier in target relay chain

func (*UnionRouter) Start

func (u *UnionRouter) Start() error

func (*UnionRouter) Stop

func (u *UnionRouter) Stop() error

Directories

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

Jump to

Keyboard shortcuts

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