Resolver is a DNS service discovery backend that retries on errors, only uses TCP, and pools connections to nameservers to increase reliability. This backend: * Does _not_ use search domains, all names are assumed to be fully qualified * Only uses TCP connections to the nameservers * Keeps several
| 49 | // * `timeout` option |
| 50 | // * `ndots` option |
| 51 | type Resolver struct { |
| 52 | client Client |
| 53 | logger log.Logger |
| 54 | confPath string |
| 55 | reloadPeriod time.Duration |
| 56 | stop chan struct{} |
| 57 | |
| 58 | mtx sync.RWMutex |
| 59 | conf *dns.ClientConfig |
| 60 | } |
| 61 | |
| 62 | // NewResolver creates a new Resolver that uses the provided resolv.conf configuration |
| 63 | // to perform DNS queries. Configuration from resolv.conf will be periodically reloaded. |
nothing calls this directly
no outgoing calls
no test coverage detected