Documentation ¶
Index ¶
- Constants
- func CTXTransfer(ctx *gin.Context) context.Context
- func CTXWrapper(requestID string, userID string, userName string) context.Context
- func CTXWrapper2(requestID string, userID string, userName string, globalXID string, ...) context.Context
- func RPCCTXTransfer(requestID, userID string) context.Context
- func STDGlobalXID(ctx context.Context) string
- func STDLocalXID(ctx context.Context) string
- func STDRequestID(ctx context.Context) zap.Field
- func STDRequestID2(ctx context.Context) string
- func STDUserID(ctx context.Context) string
- func STDUserName(ctx context.Context) string
- func SetRequestID2(ctx context.Context, requestID string) context.Context
Constants ¶
View Source
const ( // HeadRequestID request id key HeadRequestID = "Request-Id" // HeadUserID user id key HeadUserID = "User-Id" // HeadUserName user name key HeadUserName = "User-Name" // GlobalXID global transaction id GlobalXID = "xid" // LocalXID local transaction id LocalXID = "localXid" )
Variables ¶
This section is empty.
Functions ¶
func CTXWrapper ¶
CTXWrapper wrwpper
func CTXWrapper2 ¶
func CTXWrapper2(requestID string, userID string, userName string, globalXID string, localXID string) context.Context
CTXWrapper2 wrapper
func RPCCTXTransfer ¶
RPCCTXTransfer func
func STDGlobalXID ¶
STDGlobalXID global transaction id
func STDRequestID ¶
STDRequestID get request id from context.Context
func STDRequestID2 ¶
STDRequestID2 get request id from context
func STDUserName ¶
STDUserName get user name from context.Context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.