|
|
@ -20,20 +20,19 @@ func WithTriggerIDContext(ctx context.Context, triggerID string) context.Context
|
|
|
|
func NewCtx(operationID string) context.Context {
|
|
|
|
func NewCtx(operationID string) context.Context {
|
|
|
|
c := context.Background()
|
|
|
|
c := context.Background()
|
|
|
|
ctx := context.WithValue(c, constant.OperationID, operationID)
|
|
|
|
ctx := context.WithValue(c, constant.OperationID, operationID)
|
|
|
|
SetOperationID(ctx, operationID)
|
|
|
|
return SetOperationID(ctx, operationID)
|
|
|
|
return ctx
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func SetOperationID(ctx context.Context, operationID string) {
|
|
|
|
func SetOperationID(ctx context.Context, operationID string) context.Context {
|
|
|
|
ctx = context.WithValue(ctx, constant.OperationID, operationID)
|
|
|
|
return context.WithValue(ctx, constant.OperationID, operationID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func SetOpUserID(ctx context.Context, opUserID string) {
|
|
|
|
func SetOpUserID(ctx context.Context, opUserID string) context.Context {
|
|
|
|
ctx = context.WithValue(ctx, constant.OpUserID, opUserID)
|
|
|
|
return context.WithValue(ctx, constant.OpUserID, opUserID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func SetConnID(ctx context.Context, connID string) {
|
|
|
|
func SetConnID(ctx context.Context, connID string) context.Context {
|
|
|
|
ctx = context.WithValue(ctx, constant.ConnID, connID)
|
|
|
|
return context.WithValue(ctx, constant.ConnID, connID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func GetOperationID(ctx context.Context) string {
|
|
|
|
func GetOperationID(ctx context.Context) string {
|
|
|
|