use metadata.Metadata (#8)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/unistack-org/micro/v3/codec"
|
||||
"github.com/unistack-org/micro/v3/metadata"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -57,7 +58,7 @@ type Response interface {
|
||||
// Read the response
|
||||
Codec() codec.Reader
|
||||
// read the header
|
||||
Header() map[string]string
|
||||
Header() metadata.Metadata
|
||||
// Read the undecoded response
|
||||
Read() ([]byte, error)
|
||||
}
|
||||
|
||||
@@ -66,14 +66,14 @@ func (n *noopRequest) Stream() bool {
|
||||
|
||||
type noopResponse struct {
|
||||
codec codec.Reader
|
||||
header map[string]string
|
||||
header metadata.Metadata
|
||||
}
|
||||
|
||||
func (n *noopResponse) Codec() codec.Reader {
|
||||
return n.codec
|
||||
}
|
||||
|
||||
func (n *noopResponse) Header() map[string]string {
|
||||
func (n *noopResponse) Header() metadata.Metadata {
|
||||
return n.header
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user