NewOutgoingContext creates a new context with outgoing md attached. If used in conjunction with AppendToOutgoingContext, NewOutgoingContext will overwrite any previously-appended metadata. md must not be modified after calling this function.
(ctx context.Context, md MD)
| 170 | // overwrite any previously-appended metadata. md must not be modified after |
| 171 | // calling this function. |
| 172 | func NewOutgoingContext(ctx context.Context, md MD) context.Context { |
| 173 | return context.WithValue(ctx, mdOutgoingKey{}, rawMD{md: md}) |
| 174 | } |
| 175 | |
| 176 | // AppendToOutgoingContext returns a new context with the provided kv merged |
| 177 | // with any existing metadata in the context. Please refer to the documentation |