Involved Source Files
Package status implements errors returned by gRPC. These errors are
serialized and transmitted on the wire between server and client, and allow
for additional data to be transmitted via the Details field in the status
proto. gRPC service handlers should return an error created by this
package, and gRPC clients should expect a corresponding error to be
returned from the RPC call.
This package upholds the invariants that a non-nil error may not
contain an OK code, and an OK code must result in a nil error.
Package-Level Type Names (total 2, both are exported)
/* sort exporteds by: | */
Error wraps a pointer of a status proto. It implements error and Status,
and a nil *Error should never be returned by this package.
e*spb.Status(*T) Error() string
GRPCStatus returns the Status represented by se.
Is implements future error.Is functionality.
A Error is equivalent if the code and message are identical.
*T : error
Status represents an RPC status code, message, and details. It is immutable
and should be created with New, Newf, or FromProto.
s*spb.Status
Code returns the status code contained in s.
Details returns a slice of details messages attached to the status.
If a detail cannot be decoded, the error is returned in place of the detail.
Err returns an immutable error representing s; returns nil if s.Code() is OK.
Message returns the message contained in s.
Proto returns s's status as an spb.Status proto message.
WithDetails returns a new status with the provided details messages appended to the status.
If any errors are encountered, it returns nil and the first error encountered.
func FromProto(s *spb.Status) *Status
func New(c codes.Code, msg string) *Status
func Newf(c codes.Code, format string, a ...interface{}) *Status
func (*Error).GRPCStatus() *Status
func (*Status).WithDetails(details ...proto.Message) (*Status, error)
func google.golang.org/grpc/internal/transport.(*Stream).Status() *status.Status
func google.golang.org/grpc/status.Convert(err error) *status.Status
func google.golang.org/grpc/status.FromContextError(err error) *status.Status
func google.golang.org/grpc/status.FromError(err error) (s *status.Status, ok bool)
func google.golang.org/grpc/status.FromProto(s *spb.Status) *status.Status
func google.golang.org/grpc/status.New(c codes.Code, msg string) *status.Status
func google.golang.org/grpc/status.Newf(c codes.Code, format string, a ...interface{}) *status.Status
func google.golang.org/grpc.checkRecvPayload(pf grpc.payloadFormat, recvCompress string, haveCompressor bool) *status.Status
func google.golang.org/grpc/internal/transport.ServerTransport.WriteStatus(s *transport.Stream, st *status.Status) error
func go.opencensus.io/plugin/ocgrpc.statusCodeToString(s *status.Status) string
var google.golang.org/grpc/internal/transport.statusGoAway *Status
var google.golang.org/grpc.statusOK *Status
Package-Level Functions (total 5, all are exported)
Err returns an error representing c and msg. If c is OK, returns nil.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.