Documentation ¶
Overview ¶
Copyright © 2021 Miga Labs
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ModuleName = "KDHT-DISC"
)
Functions ¶
func NewDiscoveryPeers ¶
func ReadIpfsBootnodeFile ¶
ImportBootNodeList This method will read the bootnodes list in string format and create an enode array with the parsed ENRs of the bootnodes. @param import_json_file represents the file where to read the bootnodes from. This file is configured in the config file.
Types ¶
type IPFSDiscService ¶
type IPFSDiscService struct {
// contains filtered or unexported fields
}
IPFS discovery service with Kademlia DHT https://github.com/libp2p/go-libp2p-kad-dht Fulfilling the basic PeerDiscovery interfce for the Armiarma Crawler
func NewIPFSDiscService ¶
func (*IPFSDiscService) Next ¶
func (disc *IPFSDiscService) Next() bool
return the the true if there is any new discovered peer, false if not
func (*IPFSDiscService) Peer ¶
func (disc *IPFSDiscService) Peer() (models.Peer, bool)
fills the given peer struct that satifies the core.Basic standars empty
func (*IPFSDiscService) Start ¶
func (disc *IPFSDiscService) Start()
type RoutingTable ¶
type RoutingTable struct { // PeerID is the peer whose neighbors (routing table entries) are in the array below. PeerID peer.ID // The peers that are in the routing table of the above peer Neighbors []peer.AddrInfo // First error that has occurred during crawling that peer Error error // Little Endian representation of at which CPLs errors occurred during neighbors fetches. // errorBits tracks at which CPL errors have occurred. // 0000 0000 0000 0000 - No error // 0000 0000 0000 0001 - An error has occurred at CPL 0 // 1000 0000 0000 0001 - An error has occurred at CPL 0 and 15 ErrorBits uint16 }
RoutingTable captures the routing table information and crawl error of a particular peer