-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
package linkTrace | ||
|
||
import ( | ||
"github.com/farseer-go/fs/asyncLocal" | ||
"github.com/farseer-go/fs/trace" | ||
"github.com/timandy/routine" | ||
) | ||
|
||
// CurTraceContext 当前请求的Trace上下文 | ||
var curTraceContext = routine.NewInheritableThreadLocal[trace.ITraceContext]() | ||
|
||
// getCurTrace 获取当前TrackContext | ||
func getCurTrace() trace.ITraceContext { | ||
return curTraceContext.Get() | ||
} | ||
|
||
// setCurTrace 设置当前TrackContext | ||
func setCurTrace(context trace.ITraceContext) { | ||
curTraceContext.Set(context) | ||
} | ||
var curTraceContext = asyncLocal.New[trace.ITraceContext]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
go get github.com/farseer-go/collections | ||
go get github.com/farseer-go/elasticSearch | ||
go get github.com/farseer-go/fs | ||
go get github.com/farseer-go/utils | ||
go get github.com/farseer-go/mapper | ||
go get github.com/farseer-go/queue | ||
go get github.com/farseer-go/utils |