dnsdisc

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResolver

func GetResolver(ctx context.Context, nameserver string) *net.Resolver

GetResolver returns a *net.Resolver object using a custom nameserver, or the default system resolver if no nameserver is specified

Types

type DiscoveredNode

type DiscoveredNode struct {
	PeerID    peer.ID
	Addresses []ma.Multiaddr
	ENR       *enode.Node
}

func RetrieveNodes

func RetrieveNodes(ctx context.Context, url string, opts ...DnsDiscoveryOption) ([]DiscoveredNode, error)

RetrieveNodes returns a list of multiaddress given a url to a DNS discoverable ENR tree

type DnsDiscoveryOption

type DnsDiscoveryOption func(*dnsDiscoveryParameters)

func WithNameserver

func WithNameserver(nameserver string) DnsDiscoveryOption

WithNameserver is a DnsDiscoveryOption that configures the nameserver to use

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL