Documentation ¶
Overview ¶
Package peer manages the peers of the node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages known remote peers.
func NewManager ¶
func (*Manager) AddPeerAddr ¶
Add new peer with network addr.
func (*Manager) GetLiveClients ¶
func (pm *Manager) GetLiveClients() []rpcpb.NodeClient
Get a list of rpc clients from live peers.
func (*Manager) GetMetadata ¶
Get the metadata of the node.
type Peer ¶
type Peer struct { // peer network address (ip:port) Addr string // NodeID of the peer (public key) NodeID string // the role of the peer Role string // connection time ConnTime int64 // contains filtered or unexported fields }
Peer represents the overall information about the remote peer.
Click to show internal directories.
Click to hide internal directories.