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
// The multiaddress that contained the IP over which we successfully connected to the API
ConnectMaddr ma.Multiaddr
}
func (*APIResult) ListenMaddrs ¶
type CrawlDriver ¶
type CrawlDriver struct {
// contains filtered or unexported fields
}
func NewCrawlDriver ¶
func NewCrawlDriver(dbc db.Client, 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
WorkerCount int
Network config.Network
Protocols []string
DialTimeout time.Duration
CheckExposed bool
BootstrapPeers []peer.AddrInfo
AddrDialType config.AddrType
MeterProvider metric.MeterProvider
TracerProvider trace.TracerProvider
GossipSubPX bool
LogErrors bool
}
func (*CrawlDriverConfig) CrawlerConfig ¶
func (cfg *CrawlDriverConfig) CrawlerConfig() *CrawlerConfig
func (*CrawlDriverConfig) WriterConfig ¶
func (cfg *CrawlDriverConfig) WriterConfig() *core.CrawlWriterConfig
type CrawlerConfig ¶
type CrawlerConfig struct {
DialTimeout time.Duration
CheckExposed bool
AddrDialType config.AddrType
LogErrors bool
GossipSubPX 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.Client, 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 wraps a regular libp2p host and exposes additional methods to register peers to receive Identify exchange events. TODO: I'm not quite happy with all the locking going on here...
func (*Host) DeregisterIdentify ¶
DeregisterIdentify deregisters the given peer and closes the channel which was previously returned in [RegisterIdentify]
func (*Host) RegisterIdentify ¶
func (h *Host) RegisterIdentify(pid peer.ID) <-chan event.EvtPeerIdentificationCompleted
RegisterIdentify registers the given peer to receive the corresponding Identify events. The returned channel will emit the event.EvtPeerIdentificationCompleted event or be closed without an event in case of an error. The returned channel will emit at most one event.
type P2PResult ¶
type P2PResult struct {
RoutingTable *core.RoutingTable[PeerInfo]
// All multi addresses 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.
ListenMaddrs []ma.Multiaddr
// 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
// The multiaddress of the successful connection
ConnectMaddr ma.Multiaddr
// the transport of a successful connection
Transport string
}
Click to show internal directories.
Click to hide internal directories.