Documentation ¶
Index ¶
- func AppendToOutgoingContext(ctx context.Context, src []*conformancev1.Header) context.Context
- func ConvertGrpcToProtoError(err error) *conformancev1.Error
- func ConvertMetadataToProtoHeader(src metadata.MD) []*conformancev1.Header
- func ConvertProtoHeaderToMetadata(src []*conformancev1.Header) metadata.MD
- func ConvertProtoToGrpcError(err *conformancev1.Error) error
- func PercentEncodeMessage(msg string) string
- func ShouldEscapeByteInMessage(char byte) bool
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 ¶
func ConvertGrpcToProtoError(err error) *conformancev1.Error
ConvertGrpcToProtoError converts the given gRPC error to a proto Error message. If err is nil, the function will also return nil.
func ConvertMetadataToProtoHeader ¶
func ConvertMetadataToProtoHeader( src metadata.MD, ) []*conformancev1.Header
ConvertMetadataToProtoHeader converts gRPC metadata into proto Headers.
func ConvertProtoHeaderToMetadata ¶
func ConvertProtoHeaderToMetadata( src []*conformancev1.Header, ) metadata.MD
ConvertProtoHeaderToMetadata converts a slice of proto Headers into gRPC metadata.
func ConvertProtoToGrpcError ¶
func ConvertProtoToGrpcError(err *conformancev1.Error) error
ConvertProtoToGrpcError converts a proto Error into a gRPC error.
func PercentEncodeMessage ¶ added in v1.0.1
PercentEncodeMessage percent-encodes the given string per the rules in the gRPC spec for the "grpc-message" trailer value.
func ShouldEscapeByteInMessage ¶ added in v1.0.1
ShouldEscapeByteInMessage returns true if the given byte should be percent-escaped when written in the value of a "grpc-message" response trailer.
Types ¶
This section is empty.