Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
dfawley 2dfcc11f7a
status: remove redundant import (#1947) 2018-03-30 13:35:21 -07:00
dfawley 9d2250f5c8
status: rename Status to GRPCStatus to avoid name conflicts (#1944) 2018-03-27 13:26:51 -07:00
Johan Brandhorst 275695638f status: Allow external packages to produce status-compatible errors (#1927)
Embues the status package with the ability to create statuses
from generic errors that implement the interface:

type StatusError interface {
    Status() *Status
}

This was designed with the github.com/gogo/protobuf project in mind,
but is implemented in a fashion that makes it accessible to arbitrary
payloads.

Fixes #1885.
2018-03-26 15:33:25 -07:00
Eno Compton d50734d1d6 Add status.Convert convenience function (#1848)
This commit adds a function to convert between gRPC errors to
status.Status types without having to deal with an "ok" return value.
2018-02-08 13:15:38 -08:00
dfawley f4b523765c
status: add Code convenience function (#1754) 2017-12-18 15:00:50 -08:00
Kaveh Ghasemloo cdc12d4a3c status: Add WithDetails and Details functions (#1358) 2017-07-24 14:42:24 -07:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
dfawley 84cd50a2f3 Fix nil pointer dereferences from status.FromProto(nil) (#1211) 2017-04-28 14:28:53 -07:00
Menghan Li a7fee9febf Use proto.Equal for equalities on Go proto messages (#1204) 2017-04-27 10:19:45 -07:00
dfawley b47cbd158b Use proto import from google.golang.org instead of github.com (#1176) 2017-04-10 10:15:59 -07:00
dfawley 1d27587e10 Change status package to deal with concrete types instead of interfaces (#1171) 2017-04-06 11:41:07 -07:00
dfawley 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