WithMetadata returns a copy of the context with associated Metadata.
(ctx context.Context, m *Metadata)
| 55 | |
| 56 | // WithMetadata returns a copy of the context with associated Metadata. |
| 57 | func WithMetadata(ctx context.Context, m *Metadata) context.Context { |
| 58 | return context.WithValue(ctx, ctxKey{}, m) |
| 59 | } |
| 60 | |
| 61 | // MetadataFromContext retrieves the Metadata from the context. |
| 62 | func MetadataFromContext(ctx context.Context) *Metadata { |
no outgoing calls