StartRequest initializes metadata storage in the request context.
(req *http.Request)
| 66 | |
| 67 | // StartRequest initializes metadata storage in the request context. |
| 68 | func StartRequest(req *http.Request) context.Context { |
| 69 | meta := make(map[string]any) |
| 70 | return context.WithValue(req.Context(), metaCtxKey{}, meta) |
| 71 | } |
| 72 | |
| 73 | // SetMetadata sets a metadata key-value pair in the request context. |
| 74 | func SetMetadata(req *http.Request, key string, value any) { |