Documentation ¶
Index ¶
- type PeerManager
- type PierManager
- type Piers
- type Swarm
- func (swarm *Swarm) AddNode(newNodeID uint64, vpInfo *pb.VpInfo)
- func (swarm *Swarm) AskPierMaster(address string) (bool, error)
- func (swarm *Swarm) AsyncSend(id uint64, msg *pb.Message) error
- func (swarm *Swarm) Broadcast(msg *pb.Message) error
- func (swarm *Swarm) CountConnectedPeers() uint64
- func (swarm *Swarm) DelNode(delID uint64)
- func (swarm *Swarm) Disconnect(vpInfos map[uint64]*pb.VpInfo)
- func (swarm *Swarm) OtherPeers() map[uint64]*peer.AddrInfo
- func (swarm *Swarm) Peers() map[uint64]*pb.VpInfo
- func (swarm *Swarm) PierManager() PierManager
- func (swarm *Swarm) Piers() *Piers
- func (swarm *Swarm) Ping()
- func (swarm *Swarm) Send(id uint64, msg *pb.Message) (*pb.Message, error)
- func (swarm *Swarm) SendWithStream(s network.Stream, msg *pb.Message) error
- func (swarm *Swarm) Start() error
- func (swarm *Swarm) Stop() error
- func (swarm *Swarm) SubscribeOrderMessage(ch chan<- events.OrderMessageEvent) event.Subscription
- func (swarm *Swarm) UpdateRouter(vpInfos map[uint64]*pb.VpInfo, isNew bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerManager ¶
type PeerManager interface { // Start Start() error // Stop Stop() error // AsyncSend sends message to peer with peer info. AsyncSend(uint64, *pb.Message) error // SendWithStream sends message using existed stream SendWithStream(network.Stream, *pb.Message) error // Send sends message waiting response Send(uint64, *pb.Message) (*pb.Message, error) // Broadcast message to all node Broadcast(*pb.Message) error // CountConnectedPeers counts connected peer numbers CountConnectedPeers() uint64 // Peers Peers() map[uint64]*pb.VpInfo // OtherPeers OtherPeers() map[uint64]*peer.AddrInfo // SubscribeOrderMessage SubscribeOrderMessage(ch chan<- events.OrderMessageEvent) event.Subscription // AddNode adds a vp peer. AddNode(newNodeID uint64, vpInfo *pb.VpInfo) // DelNode deletes a vp peer. DelNode(delID uint64) // UpdateRouter update the local router to quorum router. UpdateRouter(vpInfos map[uint64]*pb.VpInfo, isNew bool) bool // Disconnect disconnect with all vp peers. Disconnect(vpInfos map[uint64]*pb.VpInfo) // PierManager PierManager() PierManager }
type PierManager ¶ added in v1.5.0
type Piers ¶ added in v1.5.0
type Piers struct {
// contains filtered or unexported fields
}
func (*Piers) CheckMaster ¶ added in v1.5.0
type Swarm ¶
type Swarm struct {
// contains filtered or unexported fields
}
func (*Swarm) AskPierMaster ¶ added in v1.5.0
func (*Swarm) CountConnectedPeers ¶ added in v1.4.0
func (*Swarm) Disconnect ¶ added in v1.4.0
func (*Swarm) PierManager ¶ added in v1.5.0
func (swarm *Swarm) PierManager() PierManager
func (*Swarm) SendWithStream ¶
func (*Swarm) SubscribeOrderMessage ¶
func (swarm *Swarm) SubscribeOrderMessage(ch chan<- events.OrderMessageEvent) event.Subscription
Directories ¶
Path | Synopsis |
---|---|
Package mock_peermgr is a generated GoMock package.
|
Package mock_peermgr is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.