Discover Packages
github.com/levakin/amqp-rpc
internal
status
package
Version:
v0.8.0
Opens a new window with list of versions in this module.
Published: Jul 14, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Err returns an error representing c and msg. If c is OK, returns nil.
Errorf returns Error(c, fmt.Sprintf(format, a...)).
Error wraps a pointer of a status proto. It implements error and Status,
and a nil *Error should never be returned by this package.
Is implements future error.Is functionality.
A Error is equivalent if the code and message are identical.
RPCStatus returns the Status represented by se.
Status represents an RPC status code, message, and details. It is immutable
and should be created with New, Newf, or FromProto.
FromProto returns a Status representing s.
New returns a Status representing c and msg.
Newf returns New(c, fmt.Sprintf(format, a...)).
Code returns the status code contained in s.
func (s *Status ) Details() []interface{}
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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.