Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ThreadLocal ¶
type ThreadLocal[T any] struct { // contains filtered or unexported fields }
ThreadLocal ThreadLocalStorage 线程本地存储
func NewThreadLocal ¶
func NewThreadLocal[T any](supplier ...Supplier[T]) *ThreadLocal[T]
NewThreadLocal 创建线程本地存储
func NewTraceIdThreadLocal ¶
func NewTraceIdThreadLocal(supplier Supplier[string]) *ThreadLocal[string]
NewTraceIdThreadLocal 基于GoRoutine的TraceId处理器 如果不指定supplier则使用默认策略 uuid
Click to show internal directories.
Click to hide internal directories.