Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Peer
- func (p *Peer) Bootstrap(ctx context.Context) error
- func (p *Peer) FindAllPeers(ctx context.Context, whos []peer.ID, by time.Duration, workers int) chan peer.AddrInfo
- func (p *Peer) FindPeer(ctx context.Context, who peer.ID) (peer.AddrInfo, error)
- func (p *Peer) FindPeerWithTimeout(ctx context.Context, who peer.ID, by time.Duration) (peer.AddrInfo, error)
- func (p *Peer) GetAllPeerAgentProtocols(ctx context.Context, whos []peer.AddrInfo, by time.Duration, workers int) chan *PeerAgentProtocols
- func (p *Peer) GetPeerAgentProtocols(ctx context.Context, who peer.AddrInfo) (*PeerAgentProtocols, error)
- func (p *Peer) GetPeerAgentProtocolsWithTimeout(ctx context.Context, who peer.AddrInfo, by time.Duration) (*PeerAgentProtocols, error)
- type PeerAgentProtocols
Constants ¶
View Source
const CalibnetDHTPrefix = "/fil/kad/calibrationnet"
View Source
const MainnetDHTPrefix = "/fil/kad/testnetnet"
Variables ¶
View Source
var CalibnetPeers []peer.AddrInfo
View Source
var MainnetPeers []peer.AddrInfo
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
func (*Peer) FindAllPeers ¶
func (p *Peer) FindAllPeers(ctx context.Context, whos []peer.ID, by time.Duration, workers int) chan peer.AddrInfo
FindAllPeers queries the DHT for all peers in `whos` using `workers` goroutines, each peer has a find timeout of `by`. FindAllPeers will close the returned channel when all find operations have completed. Errors for finding peers are ignored.
func (*Peer) FindPeerWithTimeout ¶
func (*Peer) GetAllPeerAgentProtocols ¶
func (*Peer) GetPeerAgentProtocols ¶
Click to show internal directories.
Click to hide internal directories.