racer

package
v0.0.0-...-103085b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrQueryRacerTimeout = errors.New("query timeout")
)

Functions

This section is empty.

Types

type NS

type NS struct {
	Addr    string
	Fqdn    string
	Version pigdns.RequestFamily
}

func (*NS) Copy

func (n *NS) Copy() NS

func (*NS) String

func (n *NS) String() string

type QueryRacer

type QueryRacer struct {
	// contains filtered or unexported fields
}

the query racer, given a list of authoritative nameservers and a query, starts a run to get the result. It peeks one nameserver from the list and starts an exchange. It starts a timer also. If the timer expires, it starts a new exchange using the next nameserver. If one of the nameservers returns an answer, the run ends. If all of the nameserers give errors, the run ends

func NewCachedQueryRacer

func NewCachedQueryRacer(datadir string, cacheSize int) *QueryRacer

func NewQueryRacer

func NewQueryRacer() *QueryRacer

func (*QueryRacer) Run

func (qr *QueryRacer) Run(servers []NS, req *dns.Msg, isIPV6 bool) (*dns.Msg, error)

Jump to

Keyboard shortcuts

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