New creates a new resolver with the specified timeout
(timeout time.Duration)
| 22 | |
| 23 | // New creates a new resolver with the specified timeout |
| 24 | func New(timeout time.Duration) *Resolver { |
| 25 | return &Resolver{ |
| 26 | timeout: timeout, |
| 27 | cache: make(map[string]string), |
| 28 | noCache: false, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // SetNoCache disables caching - each lookup will hit DNS directly |
| 33 | func (r *Resolver) SetNoCache(noCache bool) { |
no outgoing calls