195 Commits

Author SHA1 Message Date
8214c28a62 Make IO Buffer size configurable. (#1544)
* Make IO Buffer size configurable.

* Fixing typo
2017-09-28 14:11:14 -07:00
894322f00c Dedicated goroutine for writing. (#1498) 2017-09-14 13:44:14 -07:00
01089b2972 Remove buf copy when the compressor exist (#1427) 2017-08-25 12:26:38 -07:00
9d99afc2fd Automatic WriteStatus for RecvMsg/SendMsg error on server side (#1409)
automatically WriteStatus if there's any error when RecvMsg/SendMsg on server side.
2017-08-14 12:24:23 -07:00
73041be906 Add 'experimental' note to ServeHTTP godoc (#1429) 2017-08-08 08:58:35 -07:00
383b11435b Document Server.ServeHTTP (#1406)
Fixes #549
2017-08-07 13:10:34 -07:00
d6723916d2 Use log severity and verbosity level (#1340)
- All logs use 1 severity level instead of printf
 - All transport logs only go to verbose level 2+
 - The default logger only log errors and verbosity level 1
 - Add environment variable GRPC_GO_LOG_SEVERITY_LEVEL and GRPC_GO_LOG_VERBOSITY_LEVEL to set severity or verbosity levels for the default logger
2017-07-13 12:10:19 -07:00
57ff3285cf Catch invalid use of Server.RegisterService after Register.Serve (#828) 2017-06-26 10:39:47 -07:00
ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
6fecf2831a Reopening: Server shouldn't Fatalf in case it fails to encode. (#1276)
* Server shouldn't Fatalf in case it fails to encode.
2017-06-02 12:32:37 -07:00
843116533a Revert "Server shouldn't Fatalf in case it fails to encode. (#1251)" (#1274)
This reverts commit d5bc85c1e9a36225ecc02757efcc874e13962973.
2017-06-01 12:34:28 -07:00
d5bc85c1e9 Server shouldn't Fatalf in case it fails to encode. (#1251)
* Server shouldn't Fatalf in case it fails to encode.

* golint

* post-review update
2017-06-01 11:57:45 -07:00
9f919f7b81 Merge pull request #1165 from lyuxuan/service_config_pr
Expand service config support
2017-05-22 11:15:26 -07:00
9bf8ea0a82 clientconn, server: replace time.After with time.NewTimer (#998)
When timeout is not hit `time.After` will leak unnecessary timer, so
it's better to stop timer explicitly.

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2017-05-19 15:57:10 -07:00
d19bbe846e change max message size functions name 2017-05-19 11:08:40 -07:00
504db8e582 merge master 2017-05-18 14:52:35 -07:00
3773797869 Travis: add staticcheck (#1019)
Also only run golint and go vet in Go 1.8, and fix some vet failures.
2017-05-15 17:05:27 -07:00
7505481848 comments added 2017-05-15 15:13:53 -07:00
bdf9a640e4 add timeout test, add check or pointer filed in callOption, fix minor issues 2017-05-15 13:51:11 -07:00
3ea287058c Merge branch 'master' into service_config_pr 2017-05-07 16:49:32 -07:00
66a9140c20 make ServerOption panic messages more clear. (#1194)
ServerOption panics when fields that have been manually set are
subsequently set again.  The message verbiage of `X has been set` is
unclear since `has been set` without an adverb like `already` does not
correctly convey that the fields are set-once and were previously set.
At the worst, the original verbiage `X has been set` could imply that
the new value would have been acceptable but another error occurred.

We discovered this while conducting a code survey for implementing
extensible stubs and uniform inbound interception API.
2017-05-05 13:31:10 -07:00
f3b5bf53ce Make window size configurable. (#1210)
* Make window size configurable.
2017-05-05 13:26:56 -07:00
a40b8d44e0 Address the comments 2017-05-04 16:29:17 -07:00
7ddf89f9b7 Fix doc 2017-05-04 10:30:28 -07:00
0914b46180 don't add defer func if stats handler is nil (#1214) 2017-05-02 10:16:45 -07:00
ecbc34aaca move server defaults, delete defer cancel() in stream.go 2017-04-26 17:39:57 -07:00
cb02ab4d25 change error message from InvalidArgument to ResourceExhausted 2017-04-13 16:51:56 -07:00
8788b75675 merge master resolve conflicts 2017-04-13 16:28:15 -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
1d27587e10 Change status package to deal with concrete types instead of interfaces (#1171) 2017-04-06 11:41:07 -07:00
f02290b023 Merge branch 'master' into service_config_pr 2017-04-05 11:15:55 -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
ad16b942fb fix gofmt goimports go tool vet errors 2017-04-03 16:03:05 -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
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
82fb96a360 Rest of the implementation 2017-03-10 17:30:46 -08:00
d9b58b5ce9 Initial commit 2017-03-09 15:33:28 -08:00
e59576b1bb add support for user-provided UnknownStreamHandler 2017-02-27 18:07:41 +00:00
cb653e4b61 Change stats APIs (#1030)
Change stats API from one static handler to one handler per server or client.
2017-01-09 17:11:32 -08:00
5ad7c5b8ca add always returns non-nil error comment to server.serve() 2016-12-08 13:48:11 -08:00
deb01f422a add stats tagger APIs and connection stats. (#992)
* add stats.tagger APIs and connection stats.

* fix comments

use ac.ctx in http2client
change name and comments
small fixes stats_tests

* add a TODO to ConnTagInfo

* rename handle to handleRPC

* modify stats comments
2016-11-30 16:25:46 -08:00
f80f54e4d9 fix failing tests 2016-11-08 21:22:07 -08:00
6445dedfbc fix wrong context when handling stats 2016-11-08 18:17:14 -08:00
ff0b1db33e fix comments 2016-11-08 10:31:02 -08:00
d23fdd776b fix comments 2016-11-07 15:32:44 -08:00