Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCClientInterceptor ¶
func GRPCClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) (err error)
GRPCClientInterceptor 拦截器
func GRPCServerInterceptor ¶
func GRPCServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
GRPCServerInterceptor 拦截器
Types ¶
type TextMapReader ¶
TextMapReader read
func (TextMapReader) ForeachKey ¶
func (t TextMapReader) ForeachKey(handler func(key, val string) error) error
ForeachKey 读取metadata中的span信息
type TextMapWriter ¶
TextMapWriter carrier
func (TextMapWriter) Set ¶
func (t TextMapWriter) Set(key, val string)
Set 重写TextMapWriter的Set方法,我们需要将carrier中的数据写入到metadata中,这样grpc才会携带。
Click to show internal directories.
Click to hide internal directories.