delegatingresolver

package
v1.72.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package delegatingresolver implements a resolver capable of resolving both target URIs and proxy addresses.

Index

Constants

This section is empty.

Variables

View Source
var (

	// HTTPSProxyFromEnvironment will be overwritten in the tests
	HTTPSProxyFromEnvironment = http.ProxyFromEnvironment
)

Functions

func New

func New(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions, targetResolverBuilder resolver.Builder, targetResolutionEnabled bool) (resolver.Resolver, error)

New creates a new delegating resolver that can create up to two child resolvers:

  • one to resolve the proxy address specified using the supported environment variables. This uses the registered resolver for the "dns" scheme.
  • one to resolve the target URI using the resolver specified by the scheme in the target URI or specified by the user using the WithResolvers dial option. As a special case, if the target URI's scheme is "dns" and a proxy is specified using the supported environment variables, the target URI's path portion is used as the resolved address unless target resolution is enabled using the dial option.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL