xgrpc

package
v0.0.0-...-6c424d2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SystemField                           = zap.String("system", "grpc")
	ServerField                           = zap.String("span.kind", "server")
	ClientField                           = zap.String("span.kind", "client")
	JsonPbMarshaller blog.JsonPbMarshaler = &jsonpb.Marshaler{}
)

Functions

func GrpcMessageProducer

func GrpcMessageProducer(ctx context.Context, msg string, level zapcore.Level, err error, fields []zapcore.Field)

func GrpcRecoveryHandlerFunc

func GrpcRecoveryHandlerFunc(ctx context.Context, p interface{}) (err error)

func PayloadStreamClientInterceptor

func PayloadStreamClientInterceptor(zapLogger *bzap.ZapLogger) grpc.StreamClientInterceptor

PayloadStreamClientInterceptor 流拦截器,用于记录客户端请求和响应

func PayloadStreamServerInterceptor

func PayloadStreamServerInterceptor(zapLogger *bzap.ZapLogger) grpc.StreamServerInterceptor

PayloadStreamServerInterceptor 流拦截器,用于记录服务端请求和响应

func PayloadUnaryClientInterceptor

func PayloadUnaryClientInterceptor(zapLogger *bzap.ZapLogger) grpc.UnaryClientInterceptor

PayloadUnaryClientInterceptor 一元拦截器,用于记录客户端端请求和响应

func PayloadUnaryServerInterceptor

func PayloadUnaryServerInterceptor(zapLogger *bzap.ZapLogger) grpc.UnaryServerInterceptor

PayloadUnaryServerInterceptor 一元服务器拦截器,用于记录服务端请求和响应

Types

This section is empty.

Jump to

Keyboard shortcuts

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