import "github.com/ethereum/go-ethereum/p2p/dnsdisc"
Package dnsdisc implements node discovery via DNS (EIP-1459).
client.go doc.go error.go sync.go tree.go
ParseURL parses an enrtree:// URL and returns its components.
type Client struct {
// contains filtered or unexported fields
}
Client discovers nodes by querying DNS servers.
NewClient creates a client.
NewIterator creates an iterator that visits all nodes at the given tree URLs.
SyncTree downloads the entire node tree at the given URL.
type Config struct { Timeout time.Duration // timeout used for DNS lookups (default 5s) RecheckInterval time.Duration // time between tree root update checks (default 30min) CacheLimit int // maximum number of cached records (default 1000) RateLimit float64 // maximum DNS requests / second (default 3) ValidSchemes enr.IdentityScheme // acceptable ENR identity schemes (default enode.ValidSchemes) Resolver Resolver // the DNS resolver to use (defaults to system DNS) Logger log.Logger // destination of client log messages (defaults to root logger) }
Config holds configuration options for the client.
Resolver is a DNS resolver that can query TXT records.
type Tree struct {
// contains filtered or unexported fields
}
Tree is a merkle tree of node records.
MakeTree creates a tree containing the given nodes and links.
Links returns all links contained in the tree.
Nodes returns all nodes contained in the tree.
Seq returns the sequence number of the tree.
SetSignature verifies the given signature and assigns it as the tree's current signature if valid.
Sign signs the tree with the given private key and sets the sequence number.
Signature returns the signature of the tree.
ToTXT returns all DNS TXT records required for the tree.
Package dnsdisc imports 23 packages (graph) and is imported by 36 packages. Updated 2020-06-24. Refresh now. Tools for package owners.