Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnaryClientCtxIDInterceptor ¶
func UnaryClientCtxIDInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
func UnaryServerCtxIDInterceptor ¶
func UnaryServerCtxIDInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
UnaryServerCtxIDInterceptor adds the ContextIDKey to the context and sets it as a log field.
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey defines the context key type.
const ContextIDKey ContextKey = "ctx_id"
ContextIDKey holds the key of the context ID.
Click to show internal directories.
Click to hide internal directories.