commit | b5071124392bfd416c713e6595ac149b387f7186 | [log] [tgz] |
---|---|---|
author | dfawley <dfawley@google.com> | Wed Apr 05 10:35:40 2017 -0700 |
committer | GitHub <noreply@github.com> | Wed Apr 05 10:35:40 2017 -0700 |
tree | 97808990ed1e57f01c93c8539a9f8042e5d56770 | |
parent | f45e6e3b301d8eaacc87dc7242ae8b1a43595528 [diff] |
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.
#gRPC-Go
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 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.
GA
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