fixup for never micro codec changes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-12-28 15:51:10 +03:00
parent a149084e9a
commit b2aa849c1e
3 changed files with 6 additions and 4 deletions

View File

@ -55,11 +55,11 @@ func (w wrapGrpcCodec) Unmarshal(d []byte, v interface{}) error {
return w.Codec.Unmarshal(d, v)
}
func (g *wrapGrpcCodec) ReadHeader(conn io.ReadWriter, m *codec.Message, mt codec.MessageType) error {
func (g *wrapGrpcCodec) ReadHeader(conn io.Reader, m *codec.Message, mt codec.MessageType) error {
return nil
}
func (g *wrapGrpcCodec) ReadBody(conn io.ReadWriter, v interface{}) error {
func (g *wrapGrpcCodec) ReadBody(conn io.Reader, v interface{}) error {
// caller has requested a frame
switch m := v.(type) {
case *codec.Frame:
@ -69,7 +69,7 @@ func (g *wrapGrpcCodec) ReadBody(conn io.ReadWriter, v interface{}) error {
return codec.ErrInvalidMessage
}
func (g *wrapGrpcCodec) Write(conn io.ReadWriter, m *codec.Message, v interface{}) error {
func (g *wrapGrpcCodec) Write(conn io.Writer, m *codec.Message, v interface{}) error {
// if we don't have a body
if v != nil {
b, err := g.Marshal(v)

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.15
require (
github.com/golang/protobuf v1.4.3
github.com/google/go-cmp v0.5.1 // indirect
github.com/unistack-org/micro/v3 v3.0.2-0.20201215085205-f14efa64f09f
github.com/unistack-org/micro/v3 v3.0.2-0.20201220205329-e6f870bda71a
golang.org/x/net v0.0.0-20200904194848-62affa334b73
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 // indirect
golang.org/x/text v0.3.3 // indirect

2
go.sum
View File

@ -237,6 +237,8 @@ github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4
github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g=
github.com/unistack-org/micro/v3 v3.0.2-0.20201215085205-f14efa64f09f h1:jrFuYrQQuSGgODMWE2mwiUjeLxbUDrAQtGjVAnN4PUU=
github.com/unistack-org/micro/v3 v3.0.2-0.20201215085205-f14efa64f09f/go.mod h1:0DgOy4OdJxQCDER8YSKitZugd2+1bddrRSNfeooTHDc=
github.com/unistack-org/micro/v3 v3.0.2-0.20201220205329-e6f870bda71a h1:S3KGfUO9LttJMvakfFZgd1bLz8XY2Z7X0DYLdgDDhXY=
github.com/unistack-org/micro/v3 v3.0.2-0.20201220205329-e6f870bda71a/go.mod h1:0DgOy4OdJxQCDER8YSKitZugd2+1bddrRSNfeooTHDc=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=