Commit Graph

30 Commits

Author SHA1 Message Date
Arvind Bright 2dbbcefef2
resolver/dns: Add docstring to SetMinResolutionInterval (#7217) 2024-05-09 11:48:43 -07:00
Homayoon Alimohammadi 8444ae0e47
resolver/dns: Add SetMinResolutionInterval Option (#6962) 2024-04-05 10:50:58 -07:00
Hong Truong f7c5e6a762
DNS resolving with timeout (#6917) 2024-03-05 15:49:11 -08:00
Doug Fawley f691f3524e
resolver: re-add dns and passthrough packages as references to internal versions (#3162) 2019-11-08 09:53:51 -08:00
Doug Fawley c0909e91a5
resolver: move dns and passthrough to internal (#3116)
Nobody should directly need to reference these packages.

This is technically a breaking change. However:

- Package dns was exporting a NewBuilder method. This should never have been necessary to use, but if so, it can be replaced by importing the "grpc" package and then using resolver.Get("dns").

- Package passthrough was not exporting any symbols and there was never a need to even blank-import it.

After as much searching as possible, it appears nobody in the open source community is referencing either of these packages.
2019-10-22 13:01:54 -07:00
Doug Fawley ed563a02ea
resolver: add State fields to support error handling (#2951) 2019-10-04 12:59:43 -07:00
Easwar Swaminathan 31911ed09e
client: add WithConnectParams to configure connection backoff and timeout (#2960)
* Implement missing pieces for connection backoff.

Spec can be found here:
https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md

Summary of changes:
* Added a new type (marked experimental), ConnectParams, which contains
  the knobs defined in the spec (except for minConnectTimeout).
* Added a new API (marked experimental), WithConnectParams() to return a
  DialOption to dial with the provided parameters.
* Added new fields to the implementation of the exponential backoff in
  internal/backoff which mirror the ones in ConnectParams.
* Marked existing APIs WithBackoffMaxDelay() and WithBackoffConfig() as
  deprecated.
* Added a default exponential backoff implementation, for easy use of
  internal callers.

Added a new backoff package which defines the backoff configuration
options, and is used by both the grpc package and the internal/backoff
package. This allows us to have all backoff related options in a
separate package.
2019-10-03 16:47:13 -07:00
Easwar Swaminathan 5ed5cbab96 dns: rate limit DNS resolution requests (#2760) 2019-05-02 10:23:30 -07:00
Doug Fawley 3910b873d3
bar: add ability to update resolver state atomically and pass directly to the balancer (#2693) 2019-03-22 10:48:55 -07:00
lyuxuan 2098091c81
dns: prefixing txt record lookup with "_grpc_config." (#2691) 2019-03-14 13:40:48 -07:00
shaun e9c1ac35ec fix: typos (#2591) 2019-01-23 09:59:48 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Doug Fawley 59a2cfbdf9
Remove support for Go1.6-1.8 (#2428) 2018-11-01 15:43:42 -07:00
☃ Elliot Shepherd ebea9b5bbc resolver/dns: support custom dns authority (#2265) 2018-09-25 10:45:03 -07:00
dfawley 911d69081b
Make all error strings use lowercased first letter per Go style (#2286) 2018-09-04 14:09:49 -07:00
lyuxuan ce6ee6b031
dns resolver: exponential retry when getting empty address list (#2201) 2018-07-13 13:05:31 -07:00
dfawley 0c16dc1c74
resolver/dns: error if target ends with a colon instead of assuming the default port (#2150)
Technically this is a behavior change, but any usage of "host:" or ":" should be considered invalid, since dialing a target with a trailing ":" attempts to dial port zero, which is never valid (and we always used to pass the target directly to `net.Dial`).

In https://github.com/grpc/grpc/pull/15618, the target format will be defined as: `host[:port]` -- not: `host[:[port]]`.  (This is potentially subject to change.)
2018-06-22 15:23:03 -07:00
Jean de Klerk 0e5a36b652
internal: move leakcheck to internal/ (#2129)
internal: move leakcheck to internal/
2018-06-07 16:57:56 -07:00
Jacob Hoffman-Andrews 2c5843ebfd DNS resolver: Throw an error for non-default DNS authority. (#2067) 2018-06-04 10:43:01 -07:00
dfawley bd7f82c7b1
internal/grpcrand: New package for concurrency-safe randoms (#2106) 2018-05-29 09:06:35 -07:00
lyuxuan 854695bef0
client: introduce WithDisableServiceConfig DialOption (#2010) 2018-05-08 10:28:26 -07:00
lyuxuan 07709e8a3d
dns resolver: create rand seed at init time (#2007) 2018-04-26 15:10:23 -07:00
Karsten Weiss 5d8897144f Remove unnecessary type conversions (unconvert) (#1995)
This fixes:
grpc/interop/test_utils.go:156:17: unnecessary conversion
interop/test_utils.go:201:17: unnecessary conversion
resolver/dns/dns_resolver.go:190:31: unnecessary conversion
transport/flowcontrol.go:36:47: unnecessary conversion
transport/flowcontrol.go:41:47: unnecessary conversion
transport/flowcontrol.go:42:47: unnecessary conversion
transport/flowcontrol.go:43:47: unnecessary conversion
transport/http2_client.go:788:16: unnecessary conversion
transport/http2_client.go:798:36: unnecessary conversion
transport/http2_client.go:809:28: unnecessary conversion
transport/http2_client.go:834:31: unnecessary conversion
transport/http2_client.go:839:30: unnecessary conversion
transport/http2_client.go:864:23: unnecessary conversion
transport/http2_server.go:513:16: unnecessary conversion
transport/http2_server.go:524:36: unnecessary conversion
transport/http2_server.go:534:28: unnecessary conversion
transport/http2_server.go:557:31: unnecessary conversion
transport/http2_server.go:562:30: unnecessary conversion
transport/http_util.go:350:31: unnecessary conversion
2018-04-16 10:18:17 -07:00
Karsten Weiss 35a2846daa Various simplifications (gosimple)
This fixes:
clientconn.go:948:3: should write m = cc.sc.Methods[method[:i+1]] instead of m, _ = cc.sc.Methods[method[:i+1]] (S1005)
encoding/proto/proto_test.go:43:5: should use !bytes.Equal(p.GetBody(), expectedBody) instead (S1004)
resolver/dns/dns_resolver.go:260:2: should merge variable declaration with assignment on next line (S1021)
resolver/dns/dns_resolver.go:344:2: should use 'return <expr>' instead of 'if <expr> { return <bool> }; return <bool>' (S1008)
2018-04-15 15:32:33 +02:00
Keegan Carruthers-Smith e8d9fec333 resolver/dns: Typo in lookupHost failure warning (#1981) 2018-04-10 10:35:41 -07:00
田欧 faebfcb7bf Remove single-entry var blocks (#1589) 2017-10-18 09:59:23 -07:00
Menghan Li 3f10311ccf Make resolver Build() take a target struct (#1567) 2017-10-09 16:33:58 -07:00
dfawley 8443e311d3 Update format string to match type (#1548) 2017-09-29 10:12:01 -07:00
lyuxuan 8843b88fac add comment to dns package (#1545) 2017-09-28 15:34:53 -07:00
lyuxuan eaf555a871 DNS with new API (#1513)
dns resolver conforms to new resolver API
2017-09-28 10:58:51 -07:00