Documentation
¶
Overview ¶
Package gid provides goroutine ID retrieval with multiple provider implementations. It automatically selects the best available provider at runtime.
Provider priority: petermattis/goid > unsafe (getg) > slow (runtime.Stack)
Build tags:
- goid_nopeter: Disable petermattis/goid provider
- goid_unsafe: Enable unsafe provider (opt-in)
- goid_noslow: Disable slow provider (not recommended)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGID ¶
func GetGID() int64
GetGID returns the current goroutine ID. This is the main API that should be used by all callers.
func GetProviderName ¶
func GetProviderName() string
GetProviderName returns the name of the active provider. Useful for debugging and logging.
Types ¶
Click to show internal directories.
Click to hide internal directories.