ExtraMetadata returns the incoming metadata in ctx if it exists. The returned MD should not be modified. Writing to it may cause races. Modification should be made to copies of the returned MD.
(ctx context.Context)
| 35 | // returned MD should not be modified. Writing to it may cause races. |
| 36 | // Modification should be made to copies of the returned MD. |
| 37 | func ExtraMetadata(ctx context.Context) (md metadata.MD, ok bool) { |
| 38 | md, ok = ctx.Value(mdExtraKey{}).(metadata.MD) |
| 39 | return |
| 40 | } |