MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / GetRequestID

Function GetRequestID

internal/logging/requestid.go:33–41  ·  view source on GitHub ↗

GetRequestID retrieves the request ID from the context. Returns empty string if not found.

(ctx context.Context)

Source from the content-addressed store, hash-verified

31// GetRequestID retrieves the request ID from the context.
32// Returns empty string if not found.
33func GetRequestID(ctx context.Context) string {
34 if ctx == nil {
35 return ""
36 }
37 if id, ok := ctx.Value(requestIDKey{}).(string); ok {
38 return id
39 }
40 return ""
41}
42
43// SetGinRequestID stores the request ID in the Gin context.
44func SetGinRequestID(c *gin.Context, requestID string) {

Callers 6

callHostLogMethod · 0.92
LogWithRequestIDFunction · 0.92
selectorLogEntryFunction · 0.92
logEntryWithRequestIDFunction · 0.92
GetContextWithCancelMethod · 0.92

Calls

no outgoing calls