internal/resolver/unix: Implemented unix resolver. (#3890)

This commit is contained in:
Garrett Gutierrez
2020-10-16 11:52:54 -07:00
committed by GitHub
parent ea47aa91b3
commit 4be647f7f6
15 changed files with 229 additions and 140 deletions

View File

@ -71,7 +71,6 @@ type dialOptions struct {
// we need to be able to configure this in tests.
resolveNowBackoff func(int) time.Duration
resolvers []resolver.Builder
withProxy bool
}
// DialOption configures how we set up the connection.
@ -325,7 +324,7 @@ func WithInsecure() DialOption {
// later release.
func WithNoProxy() DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.withProxy = false
o.copts.UseProxy = false
})
}
@ -595,9 +594,9 @@ func defaultDialOptions() dialOptions {
copts: transport.ConnectOptions{
WriteBufferSize: defaultWriteBufSize,
ReadBufferSize: defaultReadBufSize,
UseProxy: true,
},
resolveNowBackoff: internalbackoff.DefaultExponential.Backoff,
withProxy: true,
}
}