# Functions
ChainStreamClient creates a single interceptor out of a chain of many interceptors.
ChainStreamServer creates a single interceptor out of a chain of many interceptors.
ChainUnaryClient creates a single interceptor out of a chain of many interceptors.
ChainUnaryServer creates a single interceptor out of a chain of many interceptors.
ClientToMetadataInterceptor is a gRPC client-side interceptor that put context value of interest into metadata for Unary RPCs.
ExpBackoffUnaryClientInterceptor is a gRPC client-side interceptor that provides retry with backoff for unary RPCs.
FromGrpcError extracts the gRPC code and frontend error from the given gRPC error.
FromMetadataIncoming returns a copy of incoming parent context in which the known context values (trace ID, user entities, etc.) will be copied from a gRPC metadata to context.
GetCustomizedExpBackOff returns a customized ExponentialBackOff.
GetExpBackOff returns ExponentialBackOff from context.
GetFastExpBackOff returns an ExponentialBackOff for fast requests.
GetMediumExpBackOff returns an ExponentialBackOff for medium speed requests.
GetOutboundIP gets the outbound IP of the local machine.
GetServiceId gets service ID from incoming context metadata.
GetSlowExpBackOff returns an ExponentialBackOff for slow requests.
InitOpenTracing initializes opentracing and returns the tracer.
NewContextFromParentSpan creates a new context with a new span, which inherits from parent span in the existing context.
ServerFromMetadataInterceptor is a gRPC server-side interceptor that put metadata as context values for Unary RPCs.
StreamRecoverServerInterceptor is a grpc server-side stream interceptor which recover from a grpc panic.
ToGrpcError converts the given error code and frontend error into a gRPC error.
ToGrpcInternalError creates a grpc internal server error based on normal golang error.
ToIncomingCtx creates a new incoming context with the metadata from an outgoing context.
ToMetadataOutgoing returns a copy of outgoing parent context in which the known context values (trace ID, user entities, etc.) will be copied to a gRPC metadata, being able to transmitted to server side.
UnaryRecoverServerInterceptor is a grpc server-side unary interceptor which recover from a grpc panic.
WithExpBackOff returns a copy of parent context with the given ExponentialBackOff.
WithServiceId returns a copy of outgoing context, with service ID as part of the metadata.
WithStreamServerChain returns a grpc server config option that accepts multiple stream interceptors.
WithUnaryServerChain returns a grpc server config option that accepts multiple unary interceptors.