Documentation
¶
Index ¶
- Constants
- type Cap
- type CrawlDriver
- type CrawlDriverConfig
- type Crawler
- type CrawlerConfig
- type DialDriver
- type DialDriverConfig
- type Dialer
- type DiscV5Result
- type ENREntryAttnets
- type ENREntryBsc
- type ENREntryCaps
- type ENREntryEth
- type ENREntryEth2
- type ENREntryLes
- type ENREntryOpStack
- type ENREntryOpera
- type ENREntryOptimism
- type ENREntryPtStack
- type ENREntrySnap
- type ENREntrySyncCommsSubnet
- type ENREntryTestID
- type ENREntryTrust
- type Libp2pResult
- type PeerInfo
Constants ¶
View Source
const MaxCrawlRetriesAfterTimeout = 2 // magic
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Network config.Network DialTimeout time.Duration BootstrapPeers []*enode.Node CrawlWorkerCount int AddrDialType config.AddrType KeepENR bool MeterProvider metric.MeterProvider TracerProvider trace.TracerProvider LogErrors bool UDPBufferSize int UDPRespTimeout time.Duration Discv5ProtocolID [6]byte WakuClusterID uint32 WakuClusterShards []uint32 }
func (*CrawlDriverConfig) CrawlerConfig ¶
func (cfg *CrawlDriverConfig) CrawlerConfig() *CrawlerConfig
func (*CrawlDriverConfig) WriterConfig ¶
func (cfg *CrawlDriverConfig) WriterConfig() *core.CrawlWriterConfig
type 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 DialDriverConfig struct {
Version string
}
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer encapsulates a libp2p host that dials peers.
type DiscV5Result ¶
type DiscV5Result struct { // The time we received the first successful response RespondedAt *time.Time // The multi address via which we received a response ConnectMaddr ma.Multiaddr // The updated ethereum node record ENR *enode.Node // The neighbors of the crawled peer RoutingTable *core.RoutingTable[PeerInfo] // 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 }
type ENREntryAttnets ¶
func (*ENREntryAttnets) ENRKey ¶
func (e *ENREntryAttnets) ENRKey() string
type ENREntryBsc ¶
func (*ENREntryBsc) ENRKey ¶
func (e *ENREntryBsc) ENRKey() string
type ENREntryCaps ¶
type ENREntryCaps []Cap
func (ENREntryCaps) ENRKey ¶
func (e ENREntryCaps) ENRKey() string
func (ENREntryCaps) Len ¶
func (e ENREntryCaps) Len() int
func (ENREntryCaps) Less ¶
func (e ENREntryCaps) Less(i, j int) bool
func (ENREntryCaps) Swap ¶
func (e ENREntryCaps) Swap(i, j int)
type ENREntryEth ¶
func (*ENREntryEth) ENRKey ¶
func (e *ENREntryEth) ENRKey() string
type ENREntryEth2 ¶
func (*ENREntryEth2) ENRKey ¶
func (e *ENREntryEth2) ENRKey() string
type ENREntryLes ¶
func (*ENREntryLes) ENRKey ¶
func (e *ENREntryLes) ENRKey() string
type ENREntryOpStack ¶
ENREntryOpStack from https://github.com/ethereum-optimism/optimism/blob/85d932810bafc9084613b978d42cd770bc044eb4/op-node/p2p/discovery.go#L172
func (*ENREntryOpStack) ENRKey ¶
func (e *ENREntryOpStack) ENRKey() string
type ENREntryOpera ¶
func (*ENREntryOpera) ENRKey ¶
func (e *ENREntryOpera) ENRKey() string
type ENREntryOptimism ¶
func (*ENREntryOptimism) ENRKey ¶
func (e *ENREntryOptimism) ENRKey() string
type ENREntryPtStack ¶
func (*ENREntryPtStack) ENRKey ¶
func (e *ENREntryPtStack) ENRKey() string
type ENREntrySnap ¶
func (*ENREntrySnap) ENRKey ¶
func (e *ENREntrySnap) ENRKey() string
type ENREntrySyncCommsSubnet ¶
type ENREntrySyncCommsSubnet struct {
SyncNets string
}
func (*ENREntrySyncCommsSubnet) DecodeRLP ¶
func (e *ENREntrySyncCommsSubnet) DecodeRLP(s *rlp.Stream) error
func (*ENREntrySyncCommsSubnet) ENRKey ¶
func (e *ENREntrySyncCommsSubnet) ENRKey() string
type ENREntryTestID ¶
type ENREntryTestID []byte
func (ENREntryTestID) ENRKey ¶
func (e ENREntryTestID) ENRKey() string
type ENREntryTrust ¶
func (*ENREntryTrust) ENRKey ¶
func (e *ENREntryTrust) ENRKey() string
type Libp2pResult ¶
type Libp2pResult struct { ConnectStartTime time.Time ConnectEndTime time.Time ConnectError error ConnectErrorStr string DialMaddrs []ma.Multiaddr ConnectMaddr ma.Multiaddr Agent string Protocols []string ListenMaddrs []ma.Multiaddr ConnClosedImmediately bool // whether conn was no error but still unconnected GenTCPAddr bool // whether a TCP address was generated WakuClusterID uint32 WakuClusterShards []uint32 }
Click to show internal directories.
Click to hide internal directories.