CtxWithID adds the given xid.ID to the context
(ctx context.Context, id xid.ID)
| 199 | |
| 200 | // CtxWithID adds the given xid.ID to the context |
| 201 | func CtxWithID(ctx context.Context, id xid.ID) context.Context { |
| 202 | return context.WithValue(ctx, idKey{}, id) |
| 203 | } |
| 204 | |
| 205 | // RequestIDHandler returns a handler setting a unique id to the request which can |
| 206 | // be gathered using IDFromRequest(req). This generated id is added as a field to the |
no outgoing calls