Documentation ¶
Overview ¶
Package gctx wraps context.Context and provides extra context features.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtxId ¶
CtxId retrieves and returns the context id from context.
func GetInitCtx ¶
GetInitCtx returns the initialization context. Initialization context is used in `main` or `init` functions.
func NeverDone ¶
NeverDone wraps and returns a new context object that will be never done, which forbids the context manually done, to make the context can be propagated to asynchronous goroutines.
func SetInitCtx ¶
SetInitCtx sets custom initialization context. Note that this function cannot be called in multiple goroutines.
Types ¶
Click to show internal directories.
Click to hide internal directories.