package status

Import Path
	google.golang.org/grpc/internal/status (on go.dev)

Dependency Relation
	imports 6 packages, and imported by 3 packages

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. (*Error) 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. *Error : error
Status represents an RPC status code, message, and details. It is immutable and should be created with New, Newf, or FromProto. 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. (*Status) String() string 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. *Status : expvar.Var *Status : fmt.Stringer 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 IsRestrictedControlPlaneCode(s *Status) bool func google.golang.org/grpc/internal/transport.ServerTransport.WriteStatus(s *transport.Stream, st *status.Status) error
Package-Level Functions (total 6, all are exported)
Err returns an error representing c and msg. If c is OK, returns nil.
Errorf returns Error(c, fmt.Sprintf(format, a...)).
FromProto returns a Status representing s.
IsRestrictedControlPlaneCode returns whether the status includes a code restricted for control plane usage as defined by gRFC A54.
New returns a Status representing c and msg.
Newf returns New(c, fmt.Sprintf(format, a...)).