2183 Commits

Author SHA1 Message Date
6d158dbf32 Fix markdown in README.md (#1180)
Title was not being formatted correctly.
2017-04-11 23:39:30 -07:00
ff17eeb5f6 opt in to frame reuse on the framer to reduce garbage (#1096) 2017-04-10 15:44:10 -07:00
bfa5dd27dc Client should update keepalive parameters upon receiving GoAway with … (#1169)
* Client should update keepalive parameters upon receiving GoAway with EnhanceYourCalm and debug data of too_many_pings.
2017-04-10 14:33:51 -07:00
b47cbd158b Use proto import from google.golang.org instead of github.com (#1176) 2017-04-10 10:15:59 -07:00
9090ef91c3 Merge pull request #1173 from lyuxuan/fix_status_return
add error handling for InvalidArgument error from sendResponse()
2017-04-07 16:26:28 -07:00
0c1d39df28 Separate incoming and outgoing metadata in context
This will prevent the incoming RPCs' metadata from appearing in outgoing RPCs
unless it is explicitly copied, e.g.:

incomingMD, ok := metadata.FromContext(ctx)
if ok {
  ctx = metadata.NewContext(ctx, incomingMD)
}

Fixes #1148
2017-04-07 11:54:56 -07:00
087f3d6e02 transport: implement GoString on Stream (#1167)
So context.String() won't  race when printing %#v.

It is not thread-safe to call context.String() on any context with a
stream value since valueCtx will use %#v to access all of the Stream
fields without holding a lock. Instead, print the Stream's pointer and
method for its GoString.
2017-04-07 11:16:52 -07:00
74a632af0e fix comments 2017-04-06 17:28:41 -07:00
aad28b3c55 add error handling for InvalidArgument error from sendResponse() 2017-04-06 14:40:53 -07:00
c6a3937033 fix send response error case 2017-04-06 14:30:59 -07:00
fa2968617c Merge branch 'master' into service_config_pr 2017-04-06 14:12:34 -07:00
6f8b55318a fix the testMaxMsgSizeServerAPI failure 2017-04-06 14:08:04 -07:00
9f9c190692 Fix typo in interceptor.go (#1172) 2017-04-06 13:50:23 -07:00
1d27587e10 Change status package to deal with concrete types instead of interfaces (#1171) 2017-04-06 11:41:07 -07:00
f1bb70facf gofmt 2017-04-05 15:08:25 -07:00
f02290b023 Merge branch 'master' into service_config_pr 2017-04-05 11:15:55 -07:00
a66f9231a8 Make initial service config non-blocking in Dial() 2017-04-05 11:08:50 -07:00
b507112439 Add status package for reporting gRPC status and errors (#1156)
When an error implemented by the status package is returned from a service
handler, the server will transmit a rich status message in the
"grpc-status-details-bin" trailing metadata field if any detailed data is
attached to the error.  Client-side, we will decode them if present in the
server's response and return them to the user code performing the RPC.

This is backward compatible with the existing errors supported by the grpc
package.  However, the grpc.Errorf, grpc.Code and grpc.ErrorDesc functions for
managing errors are now deprecated; status.Errorf and status.Status type
asserions should be used instead.
2017-04-05 10:35:40 -07:00
f45e6e3b30 Bug fix(Issue#1141): Check if peer is nil before trying to derefer it. (#1143) 2017-04-04 15:08:14 -07:00
ad16b942fb fix gofmt goimports go tool vet errors 2017-04-03 16:03:05 -07:00
ee8ed34bcf get more metrics from go benchmark servers (#913)
* add user and system cpu usage to go benchmarks

* fix import and style issues

* sample elapsed time diffs after merging histograms

* style fixes and variables renames

* add pprof server to benchmark workers to grab different profile stats

* rename variables for consistency and default to no pprof
2017-04-03 15:53:03 -07:00
a0b902a11d fix missing import 2017-04-03 15:29:39 -07:00
13b5f120b0 merge master 2017-04-03 15:20:13 -07:00
50d4175072 Add client and service side apis for limiting the send/recv msg size. Update MethodConfig struct 2017-04-03 15:03:24 -07:00
b982c1caa6 Behavior change: do not strip out gRPC user-agent (#1158) 2017-04-03 12:31:31 -07:00
b2fae0cf40 Implementation for server enforcement of keepalive policy. (#1147)
Implementation of server enforcement of keepalive policy.
Server will close connection with a client that violates this policy.
Policy parameters:
 - MinTime is the minimum amount of time a client should wait before sending a keepalive ping.
 - If PermitWithoutStream true, server expects keepalive pings even when there are no active streams(RPCs).
2017-03-31 11:37:51 -07:00
7fc29d0caa populate initReq target name and fix IP []byte type in grpclb (#1145) 2017-03-28 12:10:54 -07:00
b3cc2b5eca pick a random address if the current in use is deleted by resolver (#1135) 2017-03-28 11:13:46 -07:00
ccdf270424 add document to ClientHandshake about returning temporary error (#1125) 2017-03-28 11:12:50 -07:00
0df08a7a03 :authority should include port number (#1123) 2017-03-28 11:09:23 -07:00
14a6be430b Add grpc.Version string and use it in the UA (#1144) 2017-03-24 11:29:02 -07:00
0a20758157 remove support for go1.5 (#1132) 2017-03-23 20:52:49 -07:00
c3df40279c Support max age(#1119)
The new logic added to the server does the following:
- Gracefully closes an idle connection after a duration of keepalive.MaxConnectionIdle.
- Gracefully closes any connection after a duration of keepalive.MaxConnectionAge.
- Forcibly closes a connection after an additive period of keepalive.MaxConnectionAgeGrace over keepalive.MaxConnectionAge.
- Makes sure a connection is alive by sending pings with a frequency of keepalive.Time and closes a non-resposive connection after an additional duration of keepalive.Timeout.
2017-03-23 10:49:38 -07:00
d9541d7591 post-review commit. 2017-03-22 15:24:17 -07:00
9d8d0c6e0a Update test to work according to changes made to maxStreams behavior. (#1137) 2017-03-22 13:52:10 -07:00
50fcb6ab90 post review update 2017-03-21 17:33:03 -07:00
f1ab3d93d2 Post review update 2017-03-21 16:30:45 -07:00
c5a5dbc500 Don't return an error from dial if the balancer returns no initial servers (#1112)
This modifies the WithBlock behavior somewhat to block until there is at least
one valid connection.  Previously, each connection would be made serially until
all had completed successfully, with any errors returned to the caller.  Errors
are now only returned due to connecting to a backend if a balancer is not used,
or if there is an error starting the balancer itself.

Fixes #976
2017-03-21 11:35:53 -07:00
3c9df8ef7b Post review updates 2017-03-20 15:28:47 -07:00
cdee119ee2 Merge pull request #1124 from MakMukhi/rst_stream_issue
Upon observing timeout on rpc context, the client should send a RST_S…
2017-03-14 15:44:13 -07:00
553538425b Removing unnecessary change to http2_server 2017-03-13 18:07:08 -07:00
6b28425a45 Upon observing timeout on rpc context, the client should send a RST_STREAM to the server before freeing the quota for more rpcs to be created. 2017-03-13 17:09:45 -07:00
0713829b98 Merge pull request #1108 from MakMukhi/linter_update
golint update
2017-03-13 11:14:51 -07:00
82fb96a360 Rest of the implementation 2017-03-10 17:30:46 -08:00
e5a289ced7 MaxConnectionIdle implementation. More to follow 2017-03-10 11:56:02 -08:00
d50cf2db16 Merge pull request #1117 from MakMukhi/client_max_msg_size
Client should have a check on maximum size of received message size.
2017-03-10 11:14:43 -08:00
659f981255 more initial commits 2017-03-09 20:03:59 -08:00
0e71619115 making client consistent with server 2017-03-09 17:48:37 -08:00
1bf38b6a40 initial commit 2017-03-09 17:46:47 -08:00
b9b6d48985 test debug 2017-03-09 17:01:46 -08:00