commit | 89caed9e6216375327c493d45cc008f5593388d3 | [log] [tgz] |
---|---|---|
author | Justyna Ilczuk <justyna.ilczuk@gmail.com> | Tue Jun 13 19:34:50 2017 +0100 |
committer | Menghan Li <menghanl@google.com> | Tue Jun 13 11:34:50 2017 -0700 |
tree | 8a093cf935d3e0b5d65deac8732dbdc223be05d9 | |
parent | a94a7ac054dc76e5ab6cf170a9d82faba8aaf33f [diff] |
Return header in Stream.Header() if available (#1281) * Return header in Stream.Header() if available Add additional nonblocking select clause that would check if the header is available and return it if it is. Current implementation of transport Header often doesn't return header, but a cancel error even though the top level context is not canceled and the rpc is successful and a header is actually available. It's caused by the fact that select can choose any "ready" channel. Retrieving headers is flaky. With this fix, headers are consistently retrieved for successful rpcs. * Return header both when cancel and go away
The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the gRPC Quick Start: Go guide.
To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run:
$ go get google.golang.org/grpc
This requires Go 1.6 or later.
The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the list, you need a discussion with gRPC-Go authors and consultants.
See API documentation for package and API descriptions and find examples in the examples directory.
See the current benchmarks for some of the languages supported in this dashboard.
General Availability Google Cloud Platform Launch Stages.
Please update proto package, gRPC package and rebuild the proto files:
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
go get -u google.golang.org/grpc
protoc --go_out=plugins=grpc:. *.proto