ActiveContext returns the currently-active context. This function is experimental and might be changed or removed in the future.
()
| 1195 | // This function is experimental and might be changed |
| 1196 | // or removed in the future. |
| 1197 | func ActiveContext() Context { |
| 1198 | currentCtxMu.RLock() |
| 1199 | defer currentCtxMu.RUnlock() |
| 1200 | return currentCtx |
| 1201 | } |
| 1202 | |
| 1203 | // CtxKey is a value type for use with context.WithValue. |
| 1204 | type CtxKey string |