Documentation
¶
Index ¶
- func RouteIBTPKey(id string) []byte
- type Router
- type UnionRouter
- func (u *UnionRouter) AddAppchains(appchains []*rpcx.Appchain) error
- func (u *UnionRouter) Broadcast(appchainIds []string) error
- func (u *UnionRouter) ExistAppchain(id string) bool
- func (u *UnionRouter) Route(ibtp *pb.IBTP) error
- func (u *UnionRouter) Start() error
- func (u *UnionRouter) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RouteIBTPKey ¶
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(ids []string) error
//Route sends ibtp to the union pier in target relay chain
Route(ibtp *pb.IBTP) error
//ExistAppchain returns if appchain id exist in route map
ExistAppchain(id string) bool
//AddAppchains adds appchains to route map and broadcast them to union network
AddAppchains(appchains []*rpcx.Appchain) error
}
type UnionRouter ¶
type UnionRouter struct {
// contains filtered or unexported fields
}
func New ¶
func New(peermgr peermgr.PeerManager, store storage.Storage, connectedPierIDs []string) *UnionRouter
func (*UnionRouter) AddAppchains ¶
func (u *UnionRouter) AddAppchains(appchains []*rpcx.Appchain) error
AddAppchains adds appchains to route map and broadcast them to union network
func (*UnionRouter) Broadcast ¶
func (u *UnionRouter) Broadcast(appchainIds []string) error
Broadcast broadcasts the registered appchain ids to the union network
func (*UnionRouter) ExistAppchain ¶
func (u *UnionRouter) ExistAppchain(id string) bool
ExistAppchain returns if appchain id exit in route map
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. |
Click to show internal directories.
Click to hide internal directories.