Documentation
¶
Index ¶
- func GenRandomPublicKey(targetID enode.ID, targetCPL int) (v4wire.Pubkey, error)
- type Client
- type ClientConfig
- type CrawlDriver
- type CrawlDriverConfig
- type CrawlStrategy
- type Crawler
- type CrawlerConfig
- type Devp2pResult
- type DialDriver
- type DialDriverConfig
- type Dialer
- type DiscV4Result
- type PeerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenRandomPublicKey ¶
GenRandomPublicKey generates a public key that, when hashed with Keccak256, yields a v4wire.Pubkey that has a common prefix length of targetCPL.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(privKey *ecdsa.PrivateKey, cfg *ClientConfig) *Client
type ClientConfig ¶
func DefaultClientConfig ¶
func DefaultClientConfig() *ClientConfig
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
CrawlWorkerCount int
DialTimeout time.Duration
BootstrapPeers []*enode.Node
AddrDialType config.AddrType
MeterProvider metric.MeterProvider
TracerProvider trace.TracerProvider
LogErrors bool
KeepENR bool
UDPBufferSize int
UDPRespTimeout time.Duration
}
func (*CrawlDriverConfig) CrawlerConfig ¶
func (cfg *CrawlDriverConfig) CrawlerConfig() *CrawlerConfig
func (*CrawlDriverConfig) WriterConfig ¶
func (cfg *CrawlDriverConfig) WriterConfig() *core.CrawlWriterConfig
type CrawlStrategy ¶
type CrawlStrategy string
type CrawlerConfig ¶
type Devp2pResult ¶
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 DialDriverConfig struct {
Version string
}
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer encapsulates a libp2p host that dials peers.
type DiscV4Result ¶
type DiscV4Result struct {
// The time we received the first successful response
RespondedAt *time.Time
// The updated ethereum node record
ENR *enode.Node
// The multiaddress via which we have received a response
ConnectMaddr ma.Multiaddr
// The neighbors of the crawled peer
RoutingTable *core.RoutingTable[PeerInfo]
// The strategy used to crawl the peer
Strategy CrawlStrategy
// The time the draining of bucket entries was finished
DoneAt time.Time
// The combined error of crawling the peer's buckets
Error error
// The above error mapped to a known string
ErrorStr string
}
Click to show internal directories.
Click to hide internal directories.