Documentation ¶
Index ¶
- func AppendToOutgoingContext(ctx context.Context, src []*v1.Header) context.Context
- func ConvertGrpcToProtoError(err error) *v1.Error
- func ConvertMetadataToProtoHeader(src metadata.MD) []*v1.Header
- func ConvertProtoHeaderToMetadata(src []*v1.Header) metadata.MD
- func ConvertProtoToGrpcError(err *v1.Error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToOutgoingContext ¶
AppendToOutgoingContext appends the given headers to the outgoing context. Used for sending metadata from the client side.
func ConvertGrpcToProtoError ¶
ConvertGrpcToProtoError converts the given gRPC error to a proto Error message. If err is nil, the function will also return nil.
func ConvertMetadataToProtoHeader ¶
ConvertMetadataToProtoHeader converts gRPC metadata into proto Headers.
func ConvertProtoHeaderToMetadata ¶
ConvertProtoHeaderToMetadata converts a slice of proto Headers into gRPC metadata.
func ConvertProtoToGrpcError ¶
ConvertProtoToGrpcError converts a proto Error into a gRPC error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.