grpcrecovery

package
v0.0.0-...-9135e14 Latest Latest
Warning

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

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

Documentation

Index

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

Functions

func BuildMetadataFromContext

func BuildMetadataFromContext(ctx context.Context) metadata.MD

func NewZapLogger

func NewZapLogger() grpclog.LoggerV2

创建封装了zap的对象,该对象是对LoggerV2接口的实现

func ParseMetadataToContext

func ParseMetadataToContext(ctx context.Context, md metadata.MD) context.Context

func SetLogLevel

func SetLogLevel(l zapcore.Level)

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.

Jump to

Keyboard shortcuts

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