Documentation ¶
Index ¶
- func EnableLocalTraceId(supplier Supplier[string])
- func GetGoroutineId() int64
- func GetLocalTraceId() string
- func IsEnabledLocalTraceId() bool
- func ShutdownCallback(f func(), sig ...os.Signal)
- func ShutdownCallbackDeadline(f func(), deadline time.Duration, sig ...os.Signal)
- func ShutdownHolding(sig ...os.Signal)
- type Local
- type Supplier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableLocalTraceId ¶ added in v0.0.36
EnableLocalTraceId 激活TraceIdLocal处理器 如果不指定supplier则使用默认策略 uuid
func GetLocalTraceId ¶ added in v0.0.36
func GetLocalTraceId() string
GetLocalTraceId 获取当前线程的TraceId
func IsEnabledLocalTraceId ¶ added in v0.0.36
func IsEnabledLocalTraceId() bool
IsEnabledLocalTraceId 判断是否启用了TraceIdLocal处理器
func ShutdownCallback ¶
ShutdownCallback 监听指定的信号,若不传递则使用默认信号 方法会一直阻塞直到触发所监听的信号为止,并执行回调
func ShutdownCallbackDeadline ¶
ShutdownCallbackDeadline 监听指定的信号,若不传递则使用默认信号 方法会一直阻塞直到触发所监听的信号为止 并执行回调 若在指定时间未完成回调执行,则放弃等待
func ShutdownHolding ¶
ShutdownHolding 监听指定的信号,若不传递则使用默认信号 方法会一直阻塞直到触发所监听的信号为止
Types ¶
type Local ¶ added in v0.0.36
type Local[T any] struct { // contains filtered or unexported fields }
Local ThreadLocalStorage 线程本地存储
func NewThreadLocal ¶ added in v0.0.36
NewThreadLocal 创建线程本地存储
Click to show internal directories.
Click to hide internal directories.