Stephen J Day
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
Tamir Duberstein
2a118f74a2
minor cleanup: simplify looping
2016-03-31 22:05:49 -04:00
Victor Vieux
047af78181
fix a few typos
2016-03-16 16:40:16 -07:00
iamqizhao
0be94ab3f5
fix a race between transport creation and wait returning
2016-02-22 16:26:15 -08:00
iamqizhao
af8888dc8d
remove Compressor/DecompressorGenerator
2016-01-29 14:38:20 -08:00
iamqizhao
61d7c39d4c
comments and gofmt
2016-01-25 11:18:41 -08:00
iamqizhao
da3bb0c9f7
Support compression
2016-01-22 18:21:41 -08:00
iamqizhao
c1330e18aa
some missing comments
2016-01-07 14:18:20 -08:00
iamqizhao
f0ee5628a9
add more comments
2015-12-14 14:43:21 -08:00
iamqizhao
758cf3083a
add comments to NotifyReset
2015-12-14 14:40:21 -08:00
iamqizhao
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
Daniel Kwasnick
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
iamqizhao
c0d1abc00e
fix a comment
2015-10-08 14:22:00 -07:00
iamqizhao
390cd42894
revise Picker API
2015-10-08 11:05:59 -07:00
iamqizhao
ec8414396c
bug fix: stop busy wait on new transport
2015-10-08 09:09:06 -07:00
iamqizhao
9a7e50e3d9
remove unnecessary go statement
2015-10-02 16:04:55 -07:00
iamqizhao
c01ea6e359
revise Picker API
2015-09-29 10:24:03 -07:00
iamqizhao
2899844430
fix a typo
2015-09-25 13:38:17 -07:00
iamqizhao
23fea5c44a
comments
2015-09-25 13:32:35 -07:00
iamqizhao
ec99a32572
redesign the API
2015-09-25 13:21:25 -07:00
iamqizhao
ffbdf88f0f
add more comments
2015-09-24 10:36:56 -07:00
iamqizhao
9afcd0c697
preliminary refactoring for custom naming and load balancing
2015-09-23 19:09:37 -07:00
Sameer Ajmani
980b4c6d05
grpc: restore changes after sync
...
Change-Id: I97f0c77f95086301202d0fe4ca477ae6e22dd0b5
2015-09-23 15:18:41 -04:00
iamqizhao
e6b603d375
a bit clean up
2015-09-22 19:01:33 -07:00
iamqizhao
ecf8201c7c
remove a dead member var
2015-09-22 16:12:42 -07:00
iamqizhao
dd992b3748
remove transportSeq
2015-09-21 18:17:49 -07:00
iamqizhao
804293ac57
Fix a reconnecting bug
2015-09-15 11:20:16 -07:00
Jeff Hodges
b1c6afbc7f
s/stated/started/ in Shutdown doc
2015-09-06 21:26:27 -07:00
iamqizhao
9ba820ef6a
add tests
2015-08-28 13:50:04 -07:00
iamqizhao
87c361b5a5
check transport security when using oauth2-based credentials
2015-08-28 13:19:36 -07:00
iamqizhao
3b3b9b52cc
polish
2015-08-27 22:03:38 -07:00
iamqizhao
456daaf3f1
extend ErrNoTransportSecurity message
2015-08-27 22:00:49 -07:00
iamqizhao
996538ab4b
Insecure ClientConn made explicit
2015-08-27 17:21:52 -07:00
iamqizhao
7fbf442f72
gofmt -w
2015-08-03 13:24:14 -07:00
iamqizhao
cf1376e56b
revert some unnecessary changes
2015-08-03 13:18:25 -07:00
iamqizhao
8fc68cd569
small fix
2015-08-03 13:11:00 -07:00
iamqizhao
89ca9edced
small fix
2015-08-03 11:45:42 -07:00
iamqizhao
08b3e19185
add a shortcut logic
2015-08-03 11:29:27 -07:00
iamqizhao
494b40089f
polish the func comment
2015-08-03 11:19:25 -07:00
iamqizhao
14702f8b6a
channel state API
2015-07-31 19:00:43 -07:00
iamqizhao
244bc75d79
Switch ALPN/NPN to advertise only h2
2015-07-31 14:16:02 -07:00
iamqizhao
923b849cb0
add a missing ClientConn state transition
2015-07-31 10:59:32 -07:00
iamqizhao
f680d0b77d
fix a typo
2015-07-30 15:36:59 -07:00
iamqizhao
76ef365255
Add ClientConn state
2015-07-30 15:30:26 -07:00
iamqizhao
bce3d5e24b
small fix
2015-07-28 11:24:31 -07:00
iamqizhao
e35bf02914
revise reconnect backoff strategy
2015-07-28 11:12:07 -07:00
iamqizhao
611d960757
support user-agent and allow users attach their own application user agent string
2015-07-24 11:19:08 -07:00
iamqizhao
57b3fb41f6
add some more comments
2015-06-04 15:52:06 -07:00
iamqizhao
e2677ad0f3
fix some comments
2015-06-04 15:47:02 -07:00
iamqizhao
ec20a7b857
make dialing nonblocking by default. Add a DialOption to force blocking operation.
2015-06-04 15:45:06 -07:00
iamqizhao
8c6e829589
cleanup
2015-05-12 18:02:38 -07:00
iamqizhao
3617cd5ab3
revert handshaker changes
2015-05-12 17:59:20 -07:00
Peter Edge
7c025e8694
move log package references to grpclog
2015-05-09 11:43:59 +02:00
Peter Edge
101c1e1935
change log package references to grpc/log
2015-05-09 01:16:40 +02:00
iamqizhao
814627b32e
add comments
2015-05-01 18:17:36 -07:00
iamqizhao
9d59a879e1
Add handshaker option to ClientConn
2015-05-01 18:10:40 -07:00
iamqizhao
5f7c0caeb4
modify the comment
2015-04-21 16:48:41 -07:00
iamqizhao
2cf2d0871b
remove WithNetwork and add WithDialer to have more flexibility on dialing
2015-04-21 16:19:29 -07:00
iamqizhao
3259049490
fix some typos and run gofmt
2015-04-17 13:50:18 -07:00
iamqizhao
c7b9fa27dc
addressed some comments
2015-04-01 14:22:53 -07:00
iamqizhao
9a5de0e954
make Codec configurable when creating grpc.ClientConn and grpc.Server
2015-04-01 14:02:26 -07:00
iamqizhao
e10de7abd1
fix some bugs
2015-03-13 00:16:18 -07:00
iamqizhao
5c27dd6a7a
fix a bug
2015-03-05 09:45:50 -08:00
iamqizhao
aae62e6051
remove unused import
2015-03-05 01:52:17 -08:00
iamqizhao
91a7361187
address some comments
2015-03-04 15:14:52 -08:00
iamqizhao
7bf60c1cd4
addressed some comments
2015-03-04 14:37:12 -08:00
iamqizhao
09fbfbf553
addressed some comments
2015-03-04 13:29:15 -08:00
iamqizhao
8d7b4ade87
addressed some comments
2015-03-04 13:23:39 -08:00
iamqizhao
28ad38be17
close ready when ClientConn closes
2015-03-04 13:00:47 -08:00
iamqizhao
c73e40b804
address some review comments
2015-03-04 11:15:10 -08:00
iamqizhao
351e2d0297
add more tests for dial timeout and fix some bugs
2015-03-03 19:06:44 -08:00
iamqizhao
a5ca6e56d2
Support timeout for grpc.Dial
2015-03-03 17:08:39 -08:00
iamqizhao
2b993cd479
rename the convenience function to set TLS creds
2015-02-25 22:57:07 -08:00
iamqizhao
c42573b827
improve error logging
2015-02-25 16:33:12 -08:00
iamqizhao
f63a4eec38
rename an error
2015-02-23 11:51:15 -08:00
iamqizhao
8a32815cd1
err := styple nits
2015-02-22 18:00:33 -08:00
Qi Zhao
2d61160597
rename an error string and desc.
2015-02-22 17:21:06 -08:00
Matt T. Proud
a720ae6f48
Make error conveyance more idiomatic.
...
This commit applies two bulk changes to the grpc error reporting
mechanisms:
(1.) Error strings for errors that originate within grpc are prefixed
with the package name for better clarity for where they originate
since they could percolate up in the users call chains to the
originator.
(2.) Errors that are, in fact, singletons have been converted from
fmt.Errorf to errors.New and assigned as package-level variables.
This bodes particularly well for enabling API customers to elect to
handle these errors upon receipt via equality comparison. This had
been previous impossible with the original API.
Supplementarily, ``gofmt -w -s=true`` has been run on the repository to
cleanup residual defects, and it has detected and repaired a few.
TEST=Manual go test ./...
2015-02-19 13:17:17 +01:00
iamqizhao
634392a1c6
Remove the 2nd RecvProto in the generated code for client streaming
2015-02-18 22:18:01 -08:00
iamqizhao
6148d0a55d
Migrated to the latest google.org/x/oauth2 package and added support for JWT.
2015-02-18 12:02:43 -08:00
David Symonds
416f68f4b3
Update import paths to use the new official location of the Go gRPC package.
2015-02-09 11:46:20 +11:00
David Symonds
9e789c396b
Rename top level package from "rpc" to "grpc".
...
Also move the nascent package doc to doc.go.
2015-02-09 11:45:33 +11:00
David Symonds
e71095e0ec
Move source files up one level.
...
The top-level directory in this repository is going to be
the main "grpc" package.
2015-02-09 11:33:38 +11:00