Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResult ¶
type APIResult struct { // Indicates if we actually found IP addresses to probe Attempted bool // The ID response object from the Kubo API ID *kubo.IDResponse // The Kubo routing table. Doesn't contain multi addresses. Don't use this to continue crawling. RoutingTable *kubo.RoutingTableResponse }
type CrawlDriver ¶
type CrawlDriver struct {
// contains filtered or unexported fields
}
func NewCrawlDriver ¶
func NewCrawlDriver(dbc db.Client, dbCrawl *models.Crawl, cfg *CrawlDriverConfig) (*CrawlDriver, error)
func (*CrawlDriver) Close ¶
func (d *CrawlDriver) Close()
func (*CrawlDriver) NewWorker ¶
func (d *CrawlDriver) NewWorker() (core.Worker[PeerInfo, core.CrawlResult[PeerInfo]], error)
func (*CrawlDriver) NewWriter ¶
func (d *CrawlDriver) NewWriter() (core.Worker[core.CrawlResult[PeerInfo], core.WriteResult], error)
func (*CrawlDriver) Tasks ¶
func (d *CrawlDriver) Tasks() <-chan PeerInfo
type CrawlDriverConfig ¶
type CrawlDriverConfig struct { Version string Network config.Network Protocols []string DialTimeout time.Duration TrackNeighbors bool CheckExposed bool BootstrapPeers []peer.AddrInfo AddrTrackType config.AddrType AddrDialType config.AddrType MeterProvider metric.MeterProvider TracerProvider trace.TracerProvider LogErrors bool }
func (*CrawlDriverConfig) CrawlerConfig ¶
func (cfg *CrawlDriverConfig) CrawlerConfig() *CrawlerConfig
func (*CrawlDriverConfig) WriterConfig ¶
func (cfg *CrawlDriverConfig) WriterConfig() *core.CrawlWriterConfig
type CrawlerConfig ¶
type CrawlerConfig struct { TrackNeighbors bool DialTimeout time.Duration CheckExposed bool AddrDialType config.AddrType LogErrors bool Clock clock.Clock }
func DefaultCrawlerConfig ¶
func DefaultCrawlerConfig() *CrawlerConfig
type DialDriver ¶
type DialDriver struct {
// contains filtered or unexported fields
}
func NewDialDriver ¶
func NewDialDriver(dbc *db.DBClient, cfg *DialDriverConfig) (*DialDriver, error)
func (*DialDriver) Close ¶
func (d *DialDriver) Close()
func (*DialDriver) NewWorker ¶
func (d *DialDriver) NewWorker() (core.Worker[PeerInfo, core.DialResult[PeerInfo]], error)
func (*DialDriver) NewWriter ¶
func (d *DialDriver) NewWriter() (core.Worker[core.DialResult[PeerInfo], core.WriteResult], error)
func (*DialDriver) Tasks ¶
func (d *DialDriver) Tasks() <-chan PeerInfo
type DialDriverConfig ¶
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer encapsulates a libp2p host that dials peers.
type Host ¶
Host is the interface that's required for crawling libp2p peers. Actually the *basichost.Host is required but to allow testing we define this interface here. That allows us to inject a mock host.
type P2PResult ¶
type P2PResult struct { RoutingTable *core.RoutingTable[PeerInfo] // The agent version of the crawled peer Agent string // The protocols the peer supports Protocols []string // Any error that has occurred when connecting to the peer ConnectError error // The above error transferred to a known error ConnectErrorStr string // Any error that has occurred during fetching neighbor information CrawlError error // The above error transferred to a known error CrawlErrorStr string // When was the connection attempt made ConnectStartTime time.Time // When have we established a successful connection ConnectEndTime time.Time // All connections that the remote peer claims to listen on // this can be different from the ones that we received from another peer // e.g., they could miss quic-v1 addresses if the reporting peer doesn't // know about that protocol. ListenAddrs []ma.Multiaddr // the transport of a successful connection Transport string }
type PeerInfo ¶
func (PeerInfo) DeduplicationKey ¶
Click to show internal directories.
Click to hide internal directories.