Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrQueryRacerTimeout = errors.New("query timeout")
)
Functions ¶
This section is empty.
Types ¶
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
Click to show internal directories.
Click to hide internal directories.