Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PluginID = (*Plugin)(nil)
)
Functions ¶
func FindNode ¶
func FindNode(net *network.Network, targetID peer.ID, alpha int, disjointPaths int) (results []peer.ID)
FindNode queries all peers this current node acknowledges for the closest peers to a specified target ID.
All lookups are done under a number of disjoint lookups in parallel.
Queries at most #ALPHA nodes at a time per lookup, and returns all peer IDs closest to a target peer ID.
Types ¶
type Plugin ¶
type Plugin struct { *network.Plugin DisablePing bool DisablePong bool DisableLookup bool Routes *dht.RoutingTable }
func (*Plugin) PeerDisconnect ¶
func (state *Plugin) PeerDisconnect(client *network.PeerClient)
PeerDisconnect run when a peer disconnected.
Click to show internal directories.
Click to hide internal directories.