89 Commits

Author SHA1 Message Date
19ded23951 graceful close and test 2016-05-10 19:29:44 -07:00
9c2d8546bf load balancer 2016-05-06 15:47:09 -07:00
9cec19a4d4 make setDefault(...) non-member function 2016-04-18 13:15:27 -07:00
8ef1dcabab backoff: make DefaultBackoffConfig a concrete value
To enforce immutability of the `DefaultBackoffConfig`, we've made it a
concrete value. While fields can still be set directly on the value,
taking a copy will not incidentally pull a reference to the variable.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-04-18 11:33:39 -07:00
9ff38e9093 backoff: set default values on BackoffConfig
Because most of the fields on `BackoffConfig` are unexported, correctly
using the config requires copying from the default. This sets the
defaults appropriately and falls back to a default if MaxDelay is
negative or zero.

Tests are added to ensure that the backoff is set correctly in common
use cases.

Signedroff-by: Stephen J Day <stephen.day@docker.com>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-04-15 16:12:47 -07:00
d07d0562ff Merge pull request #601 from stevvooe/backoff-strategy
backoff: allow configuration of backoff strategy
2016-04-11 10:32:33 -07:00
47b74a63a8 backoff: allow configuration of backoff strategy
The backoff function and parameters have been pulled up into an
interface `backoffStrategy`. The default parameters are now part of a
package variable `DefaultBackoffConfig`. The strategy is then plumbed
through `dialOptions`. As a result of this PR, the
maximum backoff delay can now be set using the `WithBackoffConfig` dial
option.

While the addition of strategy may seem premature, this allows one to
simply export `BackoffStrategy` and `WithBackoff` to allow arbirarily
configurable backoff strategies.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-04-07 20:17:57 -07:00
2a118f74a2 minor cleanup: simplify looping 2016-03-31 22:05:49 -04:00
047af78181 fix a few typos 2016-03-16 16:40:16 -07:00
0be94ab3f5 fix a race between transport creation and wait returning 2016-02-22 16:26:15 -08:00
af8888dc8d remove Compressor/DecompressorGenerator 2016-01-29 14:38:20 -08:00
61d7c39d4c comments and gofmt 2016-01-25 11:18:41 -08:00
da3bb0c9f7 Support compression 2016-01-22 18:21:41 -08:00
c1330e18aa some missing comments 2016-01-07 14:18:20 -08:00
f0ee5628a9 add more comments 2015-12-14 14:43:21 -08:00
758cf3083a add comments to NotifyReset 2015-12-14 14:40:21 -08:00
330d8f958c i) revise picker API and channel state API; ii) add unicastNamingPicker which supports custom name resolving. 2015-12-14 14:32:43 -08:00
0fd544f256 Fix cc.Close() state race
Fix a race condition in which a Conn's state is set to TransientFailure after Close() has been invoked – Close() should irrevocably set state to Shutdown.
2015-11-10 14:02:38 -08:00
c0d1abc00e fix a comment 2015-10-08 14:22:00 -07:00
390cd42894 revise Picker API 2015-10-08 11:05:59 -07:00
ec8414396c bug fix: stop busy wait on new transport 2015-10-08 09:09:06 -07:00
9a7e50e3d9 remove unnecessary go statement 2015-10-02 16:04:55 -07:00
c01ea6e359 revise Picker API 2015-09-29 10:24:03 -07:00
2899844430 fix a typo 2015-09-25 13:38:17 -07:00
23fea5c44a comments 2015-09-25 13:32:35 -07:00
ec99a32572 redesign the API 2015-09-25 13:21:25 -07:00
ffbdf88f0f add more comments 2015-09-24 10:36:56 -07:00
9afcd0c697 preliminary refactoring for custom naming and load balancing 2015-09-23 19:09:37 -07:00
980b4c6d05 grpc: restore changes after sync
Change-Id: I97f0c77f95086301202d0fe4ca477ae6e22dd0b5
2015-09-23 15:18:41 -04:00
e6b603d375 a bit clean up 2015-09-22 19:01:33 -07:00
ecf8201c7c remove a dead member var 2015-09-22 16:12:42 -07:00
dd992b3748 remove transportSeq 2015-09-21 18:17:49 -07:00
804293ac57 Fix a reconnecting bug 2015-09-15 11:20:16 -07:00
b1c6afbc7f s/stated/started/ in Shutdown doc 2015-09-06 21:26:27 -07:00
9ba820ef6a add tests 2015-08-28 13:50:04 -07:00
87c361b5a5 check transport security when using oauth2-based credentials 2015-08-28 13:19:36 -07:00
3b3b9b52cc polish 2015-08-27 22:03:38 -07:00
456daaf3f1 extend ErrNoTransportSecurity message 2015-08-27 22:00:49 -07:00
996538ab4b Insecure ClientConn made explicit 2015-08-27 17:21:52 -07:00
7fbf442f72 gofmt -w 2015-08-03 13:24:14 -07:00
cf1376e56b revert some unnecessary changes 2015-08-03 13:18:25 -07:00
8fc68cd569 small fix 2015-08-03 13:11:00 -07:00
89ca9edced small fix 2015-08-03 11:45:42 -07:00
08b3e19185 add a shortcut logic 2015-08-03 11:29:27 -07:00
494b40089f polish the func comment 2015-08-03 11:19:25 -07:00
14702f8b6a channel state API 2015-07-31 19:00:43 -07:00
244bc75d79 Switch ALPN/NPN to advertise only h2 2015-07-31 14:16:02 -07:00
923b849cb0 add a missing ClientConn state transition 2015-07-31 10:59:32 -07:00
f680d0b77d fix a typo 2015-07-30 15:36:59 -07:00
76ef365255 Add ClientConn state 2015-07-30 15:30:26 -07:00