Documentation
¶
Index ¶
- func AddSimpleReqIDToContext(ctx context.Context, reqID string) context.Context
- func GenerateSimpleReqID() string
- func GetSimpleReqIDFromContext(ctx context.Context) string
- func MustGetSimpleReqIDFromContext(ctx context.Context) (context.Context, string)
- func ServerSimpleRequestIDUnaryInterceptor() ...
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSimpleReqIDToContext ¶
AddSimpleReqIDToContext adds the simple request ID to the context
func GenerateSimpleReqID ¶
func GenerateSimpleReqID() string
GenerateSimpleReqID generates a simple request ID
func GetSimpleReqIDFromContext ¶
GetSimpleReqIDFromContext returns the simple request ID from the context if no simple request ID is found, returns an empty string
func MustGetSimpleReqIDFromContext ¶
MustGetSimpleReqIDFromContext returns the simple request ID from the context if no simple request ID is found, generates a new one and returns it and adds it to the context if simple request ID is found, returns new ctx with the simple request ID
func ServerSimpleRequestIDUnaryInterceptor ¶
func ServerSimpleRequestIDUnaryInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
ServerSimpleRequestIDUnaryInterceptor returns a new unary server interceptor for simple request ID if reqID is not found in the context, generates a new one and adds it to the context
Types ¶
This section is empty.