grpcutil

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToOutgoingContext

func AppendToOutgoingContext(ctx context.Context, src []*conformancev1.Header) context.Context

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL