Documentation ¶
Index ¶
- Constants
- Variables
- func BuildMetadataFromContext(ctx context.Context) metadata.MD
- func NewZapLogger() grpclog.LoggerV2
- func ParseMetadataToContext(ctx context.Context, md metadata.MD) context.Context
- func SetLogLevel(l zapcore.Level)
- func StreamClientInterceptor() grpc.StreamClientInterceptor
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryClientInterceptor() grpc.UnaryClientInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
Constants ¶
View Source
const ( Header_XRequestId = "x-request-id" Header_XB3Traceid = "x-b3-traceid" Header_XB3Spanid = "x-b3-spanid" Header_XB3Parentspanid = "x-b3-parentspanid" Header_XB3Sampled = "x-b3-sampled" Header_XB3Flags = "x-b3-flags" Header_XotSpanContext = "x-ot-span-context" )
Variables ¶
View Source
var DisableGrpcLog = false
View Source
var (
MashTracingHeaders = []string{Header_XRequestId, Header_XB3Traceid, Header_XB3Spanid, Header_XB3Parentspanid, Header_XB3Sampled, Header_XB3Flags, Header_XotSpanContext}
)
Functions ¶
func ParseMetadataToContext ¶
func SetLogLevel ¶
func StreamClientInterceptor ¶
func StreamClientInterceptor() grpc.StreamClientInterceptor
StreamServerInterceptor returns a new streaming server interceptor for panic recovery.
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor for panic recovery.
func UnaryClientInterceptor ¶
func UnaryClientInterceptor() grpc.UnaryClientInterceptor
UnaryServerInterceptor returns a new unary server interceptor for panic recovery.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for panic recovery.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.