MCPcopy Create free account
hub / github.com/brimdata/super / RequestIDFromContext

Function RequestIDFromContext

api/api.go:16–21  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

14const RequestIDHeader = "X-Request-ID"
15
16func RequestIDFromContext(ctx context.Context) string {
17 if v := ctx.Value(RequestIDHeader); v != nil {
18 return v.(string)
19 }
20 return ""
21}
22
23type Error struct {
24 Type string `json:"type"`

Callers 5

accessLogMiddlewareFunction · 0.92
panicCatchMiddlewareFunction · 0.92
MiddlewareMethod · 0.92
IDMethod · 0.92
newRequestFunction · 0.92

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected