Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Traversal)
Option configures a Traversal.
func WithQueryTimeout ¶
WithQueryTimeout sets the per-query timeout.
type Querier ¶
type Querier interface {
Query(ctx context.Context, addr krpc.NodeAddr, target int160.T, scrape bool) QueryResult
}
Querier executes a query against a DHT node.
type QueryResult ¶
type QueryResult struct {
IP netip.AddrPort
ResponseFrom *krpc.NodeInfo
Nodes []krpc.NodeInfo
Peers []krpc.NodeAddr
}
QueryResult contains the response from a DHT query.
type Traversal ¶
type Traversal struct {
// contains filtered or unexported fields
}
Traversal performs a DHT traversal toward a target, yielding peers found.
Click to show internal directories.
Click to hide internal directories.