Граф коммитов

383 Коммитов

Автор SHA1 Сообщение Дата
Garrett Gutierrez a5a36bd3f0
client: set auth header to localhost for unix target (#3730) 2020-07-21 14:07:03 -07:00
Sophos a86c873a73
cleanup: fix mention of healthcheck to health (#3731) 2020-07-09 13:09:50 -07:00
Aliaksandr Mianzhynski 4258d12073
service config: add default method config support (#3684) 2020-07-06 17:56:02 -07:00
Garrett Gutierrez 506b773066
Implemented component logging (#3617) 2020-06-26 12:04:47 -07:00
Doug Fawley 4eb418e5b2
balancer: move Balancer and Picker to V2; delete legacy API (#3431) 2020-04-28 14:52:49 -07:00
Easwar Swaminathan 4c4cafbab7
internal/transport: Get rid of TargetInfo struct. (#3527) 2020-04-14 14:43:14 -07:00
sethp-nr b02de00073
client: option to surface connection errors to callers (#3430)
This commit allows blocking clients to receive a more informative error
message than "context deadline exceeded", which is especially helpful in
tracking down persistent client misconfiguration (such as an invalid TLS
certificate, an invalid server that's refusing connections, etc.)
2020-04-09 13:45:13 -07:00
Patrick Bogen e965f2a60b
client: add a WithNoProxy dialoption (#3411) 2020-03-26 15:29:40 -07:00
panguncle 9e4ff32c82
client: fix getResolver to use scheme param (#3437) 2020-03-12 13:41:38 -07:00
Garrett Gutierrez fff75ae40f
channelz: log on channelz trace events and trace on channelz relevant logs. (#3329)
channelz: log on channelz trace events and trace on channelz relevant logs. (#3329)
2020-02-14 10:11:26 -08:00
Doug Fawley 92dd426e0c
balancer/base: keep bad SubConns in TransientFailure until Ready (#3366) 2020-02-12 15:41:45 -08:00
Easwar Swaminathan e38032e927
internal: Move parseTarget function into internal package and export it. (#3368)
This will be used by RLS LB policy to validate targets specified in the
service config.
2020-02-11 17:51:29 -08:00
Doug Fawley 7afcfdd66b
client: add interface for ClientConn to be accepted by generated code (#3334) 2020-01-24 14:49:31 -08:00
Doug Fawley cd74fa23ea
internal: remove withResolverBuilder and use WithResolvers instead (#3321) 2020-01-15 08:54:42 -08:00
Doug Fawley 0083f6eefc
client: add WithResolvers options for specifying client-local resolvers (#3320) 2020-01-14 12:44:21 -08:00
Doug Fawley c35a580b0c
Revert "balancer: move Balancer and Picker to V2; delete legacy… (#3315)
This reverts commit 336cf8d761.
2020-01-13 13:12:55 -08:00
Doug Fawley 336cf8d761
balancer: move Balancer and Picker to V2; delete legacy API (#3301) 2020-01-10 13:44:48 -08:00
Doug Fawley dc49de8acd
balancer: add V2Picker, ClientConn.UpdateState, SubConnState.ConnectionError (#3186)
Also implement V2 versions of base.*, xds, pickfirst, grpclb, and round robin balancers.
2019-11-21 10:27:29 -08:00
Doug Fawley 2cb07fcd90
resolver: rename Option to Options, leaving type aliases for now (#3175) 2019-11-12 15:23:46 -08:00
Doug Fawley 51ac07fb67
vet: revise staticcheck strategy (#3152) 2019-11-08 14:46:57 -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
Easwar Swaminathan 7c8e60372e
Add more details in ClientConn GoDoc. (#3096)
The newly added lines are mostly stolen from existing Java and C-core
documentation.
2019-10-15 09:18:24 -07:00
Joe Betz 2e7984e2c0 clientconn: override authority with address's ServerName, if set (#3073) 2019-10-08 13:59:02 -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
yuxiaobo96 861d8e7992 internal: fix typos in comments (#3046) 2019-09-30 15:30:07 -07:00
Doug Fawley e351044388
clientconn: fix potential deadlock caused by ResetConnectBackoff (#3051) 2019-09-27 10:51:22 -07:00
Doug Fawley 977142214c
client: fix race between transport draining and new RPCs (#2919)
Before these fixes, it was possible to see errors on new RPCs after a
connection began draining, and before establishing a new connection.  There is
an inherent race between choosing a SubConn and attempting to creating a stream
on it.  We should be able to avoid application-visible RPC errors due to this
with transparent retry.  However, several bugs were preventing this from
working correctly:

1. Non-wait-for-ready RPCs were skipping transparent retry, though the retry
design calls for retrying them.

2. The transport closed itself (and would consequently error new RPCs) before
notifying the SubConn that it was draining.

3. The SubConn wasn't synchronously updating itself once it was notified about
the closing or draining state.

4. The SubConn would go into the TRANSIENT_FAILURE state instantaneously,
causing RPCs to fail instead of queue.
2019-07-22 16:07:55 -07:00
Doug Fawley 24b2fb8959
client: remove option to send RPCs before HTTP/2 handshake is completed (#2904) 2019-07-12 13:37:27 -07:00
Menghan Li 5caf962939
client: addrConn NewStream and health check cleanup (#2848) 2019-06-26 11:15:17 -07:00
Doug Fawley a1d4c283c6
client: update state earlier to prevent resetTransport calls from killing good transports (#2862) 2019-06-10 16:58:43 -07:00
Menghan Li 82fdf27702
addrConn: not reset backoff if update address in TransientFailure (#2740) 2019-05-30 13:13:47 -07:00
Doug Fawley d40a995895
balancer/resolver: add loadBalancingConfig and pre-parsing support (#2732) 2019-05-30 09:12:58 -07:00
Doug Fawley b7325a3150
Update go.mod for golang/x/tools and staticcheck (#2832) 2019-05-24 11:13:46 -07:00
wjywbs ab909771a0 Fix using grpc.WithBalancerName("grpclb") explicitly (#2778) (#2802) 2019-05-10 15:42:49 -07:00
lyuxuan 4748a040c8
balancer: provide parsed target through BuildOptions (#2803) 2019-05-09 13:27:41 -07:00
Weiran Fang 776edd3ba1 interceptor: new APIs for chaining client interceptors. (#2696) 2019-04-15 11:13:34 -07:00
David Drysdale d37bd82db6 Fix DialContext when using a timeout (#2737)
Fixes #2736
2019-04-04 09:58:15 -07:00
lyuxuan ea5e6da287
service config: default service config (#2686) 2019-04-03 10:50:28 -07:00
lyuxuan 955eb8a3c8
channelz: cleanup channel registration if Dial fails (#2733) 2019-04-02 15:42:35 -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
Jean de Klerk d021e89b3f
internal: fix Dial_OneBackoffPerRetryGroup (#2689)
* internal: fix Dial_OneBackoffPerRetryGroup

Instead of mutating global variables, switches getMinConnectDeadline to a
dial option.

Fixes #2687.

* rename getMinConnectTimeoutFunc to minConnectTimeout, ditto dial opt
2019-03-20 13:58:29 -06:00
Menghan Li fba6715d1c
addrConn: resetTransport loop cleanup (#2676)
Refactor retry loop after #2673
2019-03-19 10:28:26 -07:00
Doug Fawley 3c84def893
balancer: remove Header from PickOptions; it is also available through context (#2674) 2019-03-15 09:00:55 -07:00
Menghan Li 3958fc86cc
addrConn: resetTransport cleanup (#2673) 2019-03-14 13:14:19 -07:00
Menghan Li 5abb35752c
client: reset backoff to 0 after a connection is established (#2669)
#2663
#2636
2019-03-08 10:16:19 -08:00
Jean de Klerk 5878d965b2
transport: remove RequireHandshakeHybrid support (#2529)
This removes RequireHandshakeHybrid support and changes the default behavior
to RequireHandshakeOn. Dial calls will now block and wait for a successful
handshake before proceeding. Users relying on the old hybrid behavior (cmux
users) should consult https://github.com/soheilhy/cmux/issues/64.

Also, several tests have been updated to take this into consideration by
sending settings frames.
2019-02-27 11:04:46 -07:00
Menghan Li 1dbad57dad
internal: delete an info log (#2640)
This log doesn't print much useful information, and causes flooding, especially when ClientConn is closed (one Shutdown log for each subconn).
2019-02-13 14:40:29 -08:00
Jean de Klerk a402911c6f
internal: resetTransport connect deadline is across addresses (#2540)
internal: resetTransport connect deadline is across addresses

Currently, the connect deadline is recalculated per-address. This PR amends
that behavior such that all addresses for a single connection attempt share
the same deadline.

Fixes #2462
2019-02-11 17:12:42 -07:00
shaun e9c1ac35ec fix: typos (#2591) 2019-01-23 09:59:48 -08:00