File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ type Config struct {
6060 // Expected format is {protocol}://{host}:{port}, e.g. tcp://8.8.8.8:53
6161 DNSResolver string `yaml:"dns-resolver,omitempty"`
6262
63+ // DNSResolverConfig is parsed DNSResolver
64+ // We do this to avoid parsing DNSResolver every time it is needed
6365 DNSResolverConfig * DNSResolverConfig `yaml:"-"`
6466
6567 // OAuth2Config is the OAuth2 configuration used for the client.
Original file line number Diff line number Diff line change @@ -433,9 +433,9 @@ func (e *Endpoint) getParsedBody() string {
433433}
434434
435435func (e * Endpoint ) getIP (result * Result ) {
436-
437436 resolver := net .DefaultResolver
438-
437+ // Create a custom DNS resolver for use in looking up the IP address
438+ // if the configuration specifies a custom DNS resolver address
439439 if e .ClientConfig .HasCustomDNSResolver () {
440440 dnsResolver := e .ClientConfig .DNSResolverConfig
441441 resolver = & net.Resolver {
You can’t perform that action at this time.
0 commit comments