ttrpc updates for interceptors, close, and metadata

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-06-13 19:09:07 +00:00
parent 40b17e97f6
commit 0b7abc02b2
10 changed files with 268 additions and 116 deletions

View File

@@ -30,7 +30,7 @@ const (
func withTTRPCNamespaceHeader(ctx context.Context, namespace string) context.Context {
md, ok := ttrpc.GetMetadata(ctx)
if !ok {
md = ttrpc.Metadata{}
md = ttrpc.MD{}
}
md.Set(TTRPCHeader, namespace)
return ttrpc.WithMetadata(ctx, md)