33 Commits

Author SHA1 Message Date
59a2cfbdf9 Remove support for Go1.6-1.8 (#2428) 2018-11-01 15:43:42 -07:00
ebea9b5bbc resolver/dns: support custom dns authority (#2265) 2018-09-25 10:45:03 -07:00
911d69081b Make all error strings use lowercased first letter per Go style (#2286) 2018-09-04 14:09:49 -07:00
c8fcd323ef resolver: document that SetDefaultScheme should be called at init time (#2217)
fixes #2216
2018-07-16 11:19:04 -07:00
ce6ee6b031 dns resolver: exponential retry when getting empty address list (#2201) 2018-07-13 13:05:31 -07:00
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
0e5a36b652 internal: move leakcheck to internal/ (#2129)
internal: move leakcheck to internal/
2018-06-07 16:57:56 -07:00
2c5843ebfd DNS resolver: Throw an error for non-default DNS authority. (#2067) 2018-06-04 10:43:01 -07:00
bd7f82c7b1 internal/grpcrand: New package for concurrency-safe randoms (#2106) 2018-05-29 09:06:35 -07:00
854695bef0 client: introduce WithDisableServiceConfig DialOption (#2010) 2018-05-08 10:28:26 -07:00
07709e8a3d dns resolver: create rand seed at init time (#2007) 2018-04-26 15:10:23 -07:00
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
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
c4a6e7589b documentation: mention Register functions should be call at init time (#1975) 2018-04-12 15:11:04 -07:00
e8d9fec333 resolver/dns: Typo in lookupHost failure warning (#1981) 2018-04-10 10:35:41 -07:00
d354447dc6 resolver/manual: fix minor typo (#1960)
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-02 10:01:29 -07:00
f2620c3803 resolver: keep full unparsed target string if scheme in parsed target is not registered (#1943) 2018-03-27 13:58:27 -07:00
37346e3181 Revert "Add WithResolverUserOptions for custom resolver build options" (#1839)
This reverts commit ff1be3fcc57773d500921fad479d82ec171e2358.
2018-02-05 12:52:35 -08:00
ff1be3fcc5 Add WithResolverUserOptions for custom resolver build options (#1711) 2017-12-06 15:54:01 -08:00
61c67402b9 Add comments to ClientConn/SubConn interfaces to indicate new methods may be added (#1680) 2017-12-01 13:25:57 -08:00
ddbb27e545 client: backoff before reconnecting if an HTTP2 server preface was not received (#1648) 2017-12-01 09:55:42 -08:00
00383af260 Fix misleading default resolver scheme comments (#1703)
Since a recent change, the default is `passthrough`, not `dns`.
2017-11-30 13:47:14 -08:00
1e1a47f0f2 Re-resolve target when one connection becomes TransientFailure (#1679)
This allows ClientConn to get more up-to-date addresses from resolver.
ClientConn compares new addresses with the cached ones. So if resolver returns the same set of addresses, ClientConn will not notify balancer about it.

Also moved the initialization of resolver and balancer to avoid race. Balancer will only be started when ClientConn gets resolved addresses from balancer.
2017-11-28 13:16:53 -08:00
2ef021f78d New grpclb implementation (#1558)
The new grpclb supports fallback to backends if remote balancer is unavailable
2017-11-27 11:16:26 -08:00
94f1917696 Make passthrouth resolver the default instead of dns (#1606) 2017-10-20 12:03:44 -07:00
a353537ff5 Register and use default balancers and resolvers (#1551) 2017-10-19 11:32:06 -07:00
faebfcb7bf Remove single-entry var blocks (#1589) 2017-10-18 09:59:23 -07:00
3f10311ccf Make resolver Build() take a target struct (#1567) 2017-10-09 16:33:58 -07:00
4bbdf230d7 New implementation of roundrobin and pickfirst (#1506) 2017-10-02 09:22:57 -07:00
8443e311d3 Update format string to match type (#1548) 2017-09-29 10:12:01 -07:00
8843b88fac add comment to dns package (#1545) 2017-09-28 15:34:53 -07:00
eaf555a871 DNS with new API (#1513)
dns resolver conforms to new resolver API
2017-09-28 10:58:51 -07:00
8233e124e4 Add new Resolver and Balancer APIs (gRFC L9) (#1408)
- Add package balancer and resolver.
 - Change ClientConn internals to new APIs and adds a wrapper for v1 balancer.
2017-08-31 10:59:09 -07:00