update metadata
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -2,10 +2,11 @@ package grpc
|
||||
|
||||
import (
|
||||
"github.com/unistack-org/micro/v3/codec"
|
||||
"github.com/unistack-org/micro/v3/metadata"
|
||||
)
|
||||
|
||||
type rpcResponse struct {
|
||||
header map[string]string
|
||||
header metadata.Metadata
|
||||
codec codec.Codec
|
||||
}
|
||||
|
||||
@@ -13,7 +14,7 @@ func (r *rpcResponse) Codec() codec.Writer {
|
||||
return r.codec
|
||||
}
|
||||
|
||||
func (r *rpcResponse) WriteHeader(hdr map[string]string) {
|
||||
func (r *rpcResponse) WriteHeader(hdr metadata.Metadata) {
|
||||
for k, v := range hdr {
|
||||
r.header[k] = v
|
||||
}
|
||||
|
Reference in New Issue
Block a user