MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / ReqIDFromContext

Function ReqIDFromContext

internal/nodeagent/session.go:275–281  ·  view source on GitHub ↗

ReqIDFromContext 从 dispatch ctx 中取出当前请求的 reqID(若无返回空串)。

(ctx context.Context)

Source from the content-addressed store, hash-verified

273
274// ReqIDFromContext 从 dispatch ctx 中取出当前请求的 reqID(若无返回空串)。
275func ReqIDFromContext(ctx context.Context) string {
276 if ctx == nil {
277 return ""
278 }
279 v, _ := ctx.Value(reqIDCtxKey{}).(string)
280 return v
281}

Callers 3

TestE2E_StreamLogsCancelFunction · 0.92
handleLogsStreamMethod · 0.85

Calls 1

ValueMethod · 0.80

Tested by 1

TestE2E_StreamLogsCancelFunction · 0.74