contextWithInvocation returns a wrapped context that contains an invocation.
(ctx context.Context, inv *invocation)
| 1602 | |
| 1603 | // contextWithInvocation returns a wrapped context that contains an invocation. |
| 1604 | func contextWithInvocation(ctx context.Context, inv *invocation) context.Context { |
| 1605 | return context.WithValue(ctx, invocationCtxKey{}, inv) |
| 1606 | } |
| 1607 | |
| 1608 | // invocationFromContext retrieves an invocation from a context. |
| 1609 | // If no invocation is in the context, it returns nil. |