(ctx context.Context, namespace string)
| 28 | ) |
| 29 | |
| 30 | func withTTRPCNamespaceHeader(ctx context.Context, namespace string) context.Context { |
| 31 | md, ok := ttrpc.GetMetadata(ctx) |
| 32 | if !ok { |
| 33 | md = ttrpc.MD{} |
| 34 | } else { |
| 35 | md = md.Clone() |
| 36 | } |
| 37 | md.Set(TTRPCHeader, namespace) |
| 38 | return ttrpc.WithMetadata(ctx, md) |
| 39 | } |
| 40 | |
| 41 | func fromTTRPCHeader(ctx context.Context) (string, bool) { |
| 42 | return ttrpc.GetMetadataValue(ctx, TTRPCHeader) |
searching dependent graphs…