package delegatingresolver
import "google.golang.org/grpc/internal/resolver/delegatingresolver"
Package delegatingresolver implements a resolver capable of resolving both target URIs and proxy addresses.
Index ¶
- Variables
- func New(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions, targetResolverBuilder resolver.Builder, targetResolutionEnabled bool) (resolver.Resolver, error)
Variables ¶
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.
Source Files ¶
delegatingresolver.go
- Version
- v1.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 17 minutes ago –
Tools for package owners.