add tag support

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-03-23 00:29:27 +03:00
parent 573c1f50e2
commit fd1acd56cb
6 changed files with 168 additions and 57 deletions

View File

@@ -18,7 +18,8 @@ type httpStream struct {
sync.RWMutex
address string
opts client.CallOptions
codec codec.Codec
ct string
cf codec.Codec
context context.Context
header http.Header
seq uint64
@@ -63,7 +64,7 @@ func (h *httpStream) Send(msg interface{}) error {
return errShutdown
}
hreq, err := newRequest(h.address, h.request, h.codec, msg, h.opts)
hreq, err := newRequest(h.address, h.request, h.ct, h.cf, msg, h.opts)
if err != nil {
return err
}
@@ -88,7 +89,7 @@ func (h *httpStream) Recv(msg interface{}) error {
}
defer hrsp.Body.Close()
return parseRsp(h.context, hrsp, h.codec, msg, h.opts)
return parseRsp(h.context, hrsp, h.cf, msg, h.opts)
}
func (h *httpStream) Error() error {