fix(resolver): fix async context leak, gRPC error swallowing, add 48 tests
Fix async resolve goroutine using caller's cancelable context by switching to context.WithoutCancel. Fix NewGRPCPlugin silently returning broken resolver on connection failure. Fix "resolover" typo in log field. Add doc comments to all exported symbols.
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
// Options holds configuration for an Exchanger.
|
||||
type Options struct {
|
||||
router chain.Router
|
||||
tlsConfig *tls.Config
|
||||
@@ -62,6 +63,7 @@ type Exchanger interface {
|
||||
String() string
|
||||
}
|
||||
|
||||
// exchanger implements DNS queries over UDP, TCP, TLS (DoT), or HTTPS (DoH).
|
||||
type exchanger struct {
|
||||
network string
|
||||
addr string
|
||||
|
||||
Reference in New Issue
Block a user