tracemid

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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 GormV1TraceInitialize(db *gorm.DB)

func SetGinTraceMid

func SetGinTraceMid() gin.HandlerFunc

SetGinTraceMid 创建链路追踪中间件

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

type MDReaderWriter struct {
	metadata.MD
}

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)

Jump to

Keyboard shortcuts

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