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

148 Коммитов

Автор SHA1 Сообщение Дата
Menghan Li d7d831d95e Do not create RoundRobin if balancer is not specified 2016-08-01 15:55:08 -07:00
Menghan Li 7c6eabc607 Make Dial() return original error 2016-08-01 15:55:08 -07:00
Menghan Li 1d0bea7943 Add addrConn tearDownError 2016-08-01 15:55:08 -07:00
Menghan Li e9e6ae6215 Make Dial() withblock error on bad certificates 2016-08-01 15:55:08 -07:00
Tamir Duberstein 5c7ed938f9
credentials: plumb cancellation into ClientHandshake
This is a minor breaking change to `TransportCredentials`, however
it should not be a problem in practice as not many users are using
custom implementations. In particular, users of `NewTLS` will not
be affected.

This change also replaces the earlier `Timeout` and `Cancel` fields
with a `context.Context`, which is plumbed all the way down from
`grpc.Dial`, laying the ground work for a user-provided context.

Also, support for Go 1.7 is added.
2016-08-01 16:29:56 -04:00
iamqizhao 21c5a43e47 fix a race condition causing http2Client.controller leaking 2016-08-01 11:51:20 -07:00
Menghan Li cbae5b1f01 Replace cc.newAddrConn with cc.resetAddrConn
When goaway is received by client, a new ac should replace the old ac.
Without this change, ac is removed first and a new one is added later,
ac.tearDown() and cc.newAddrConn are two functions called consecutively,
So there's a small chance that getTransport is called in between and
misses the new ac. After this change, the value in map conns is replaced
directly, and this issue should be resolved.
2016-07-29 16:03:53 -07:00
iamqizhao a09c6888cc fix another data race along with goaway 2016-07-28 19:47:38 -07:00
Menghan Li f255f72742 Merge pull request #784 from iamqizhao/race-fix
Fix a couple of races when goaway lives with connection shutdown.
2016-07-28 15:40:27 -07:00
Tamir Duberstein 096e703537
WithDialer doesn't support cancellation
This maintains cancellation for the default dialer, but external users
will have to opt in via a future API.
2016-07-28 17:00:23 -04:00
iamqizhao b128e7465a merge the conflict 2016-07-28 13:17:23 -07:00
iamqizhao cd4ca4d808 Tune transport Monitor, modify the test and add more comments 2016-07-28 11:07:42 -07:00
iamqizhao 1faf2ca61b fix the race on t.state 2016-07-27 19:46:34 -07:00
iamqizhao 63fcabeec5 some polish 2016-07-27 17:41:43 -07:00
iamqizhao 110450d45e fix races introduce by goaway 2016-07-27 17:27:10 -07:00
Tamir Duberstein 61f3f61ef0
cancel outgoing net.Dial when ClientConn is closed 2016-07-27 17:34:40 -04:00
Tamir Duberstein 2342e38669
test,transport: simplify 2016-07-27 17:20:55 -04:00
iamqizhao f1e4d3b180 allow multiple GoAways and retrying on illegal streams 2016-07-25 16:35:32 -07:00
iamqizhao 046e606dc5 clean up 2016-07-21 18:12:01 -07:00
iamqizhao 9ad4c58355 Make it work for streaming 2016-07-21 16:19:34 -07:00
iamqizhao 873cc272c2 support goaway 2016-07-20 18:48:49 -07:00
iamqizhao d2e79470cc client goaway support 2016-07-19 16:29:13 -07:00
iamqizhao f492622da4 rebase 2016-07-06 14:16:27 -07:00
Tamir Duberstein ebd9633b55
remove duplicate balancer field 2016-07-05 14:52:25 -04:00
iamqizhao be59d023f2 refactor error handling a bit 2016-06-29 15:21:44 -07:00
iamqizhao 213a20c4fe bug fix, typo fix and slight error refactoring 2016-06-28 16:08:19 -07:00
iamqizhao 01ef81a4d9 minor fix including removal of debugging logs, error code fix, etc. 2016-06-27 15:30:20 -07:00
iamqizhao 3e71fb360d Support fail-fast mode and make it the default 2016-06-27 14:36:59 -07:00
Qi Zhao 3efe7aef96 Merge pull request #713 from menghanl/split_authenticator_and_credentials
[API revision] Separate TransportAuthenticator and PerRPCCredentials
2016-06-09 14:57:55 -07:00
Menghan Li d9c8fb446d Change errCredentialsMisuse to errCredentialsConflict and errTransportCredentialsMissing 2016-06-08 13:53:41 -07:00
Menghan Li 59486d9c17 Rename TransportAuthenticator to TransportCredentials 2016-06-08 11:19:25 -07:00
Anthony Romano eada4fb145 clientconn: buffer waitC on Dial goroutine
Leaks a goroutine on dial timeout if unbuffered.
2016-06-07 15:47:54 -07:00
Menghan Li 3ffbd8e030 Rename Credentials to PerRPCCredentials 2016-06-06 17:28:10 -07:00
Menghan Li f0feaea314 Should be only one TransportAuthenticator 2016-06-06 16:35:41 -07:00
Menghan Li 6404c49192 Make TransportAuthenticator not embed Credentials 2016-06-06 16:24:46 -07:00
iamqizhao 3a6b72b858 add errNoAddr 2016-06-06 12:16:33 -07:00
iamqizhao 24a701cae7 revise the comments of WithTimeout 2016-06-06 12:13:00 -07:00
iamqizhao 404e9b67de dial time out 2016-06-06 12:08:11 -07:00
Dmitri Shuralyov e8316072cd Fix remaining instances of gRPC spelling.
According to http://www.grpc.io/faq/, the project is called gRPC. It's
already referred by that name in most places, except a few instances
where it's still "GRPC". Fix those to have consistency.
2016-06-02 18:00:07 -07:00
iamqizhao 2700f043b9 some small fixes 2016-06-01 14:09:21 -07:00
iamqizhao fca009f66f Fix some small comments 2016-05-26 15:11:33 -07:00
iamqizhao 817b48219c Fix a typo bug and handle stale addrConns 2016-05-26 14:20:31 -07:00
iamqizhao db887c9bcd rename controller 2016-05-25 18:17:23 -07:00
iamqizhao 9dc3da0633 make downErr for Balancer down closure 2016-05-25 11:28:45 -07:00
iamqizhao 0b1df3bca2 add BalancerGetOption 2016-05-24 17:19:44 -07:00
iamqizhao 5b484e4099 add Notify API; move the name resolving into Balancer 2016-05-23 19:25:01 -07:00
iamqizhao 5d62215b41 some minor fixes 2016-05-18 16:26:12 -07:00
iamqizhao 162d8d2d33 Tune Invoke behavior for the new Balancer. 2016-05-18 11:18:10 -07:00
iamqizhao e9e748b978 small fix and more comments 2016-05-17 17:18:54 -07:00
iamqizhao 65969fb499 lock optimization 2016-05-16 19:19:35 -07:00