Documentation ¶
Index ¶
- func GRPCClientTracerInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
- func GRPCServerTracerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func GormV1TraceInitialize(db *gorm.DB)
- func SetGinTraceMid() gin.HandlerFunc
- func SetReqTraceMid() *reqTrace
- type GormV2OpentracingPlugin
- type MDReaderWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCClientTracerInterceptor ¶
func GRPCClientTracerInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
GRPCClientTracerInterceptor GRPC 客户端拦截器
func GRPCServerTracerInterceptor ¶
func GRPCServerTracerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
GRPCServerTracerInterceptor GRPC 服务端拦截器
func GormV1TraceInitialize ¶
func SetReqTraceMid ¶
func SetReqTraceMid() *reqTrace
Types ¶
type GormV2OpentracingPlugin ¶
type GormV2OpentracingPlugin struct{}
func (*GormV2OpentracingPlugin) Initialize ¶
func (op *GormV2OpentracingPlugin) Initialize(db *gorm.DB) (err error)
func (*GormV2OpentracingPlugin) Name ¶
func (op *GormV2OpentracingPlugin) Name() string
type MDReaderWriter ¶
MDReaderWriter metadata不存在ForeachKey成员方法,这里需要重新声明实现
func (MDReaderWriter) ForeachKey ¶
func (c MDReaderWriter) ForeachKey(handler func(key, val string) error) error
ForeachKey 读取metadata中的span信息
func (MDReaderWriter) Set ¶
func (c MDReaderWriter) Set(key, val string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.