diff --git a/go.mod b/go.mod index 6b8007c..a5be240 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module go.unistack.org/micro-client-http/v3 go 1.16 -require go.unistack.org/micro/v3 v3.8.13 +require go.unistack.org/micro/v3 v3.8.14 diff --git a/go.sum b/go.sum index 2d758fc..952899c 100644 --- a/go.sum +++ b/go.sum @@ -6,10 +6,10 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/silas/dag v0.0.0-20210626123444-3804bac2d6d4/go.mod h1:7RTUFBdIRC9nZ7/3RyRNH1bdqIShrDejd1YbLwgPS+I= -go.unistack.org/micro-proto/v3 v3.1.0 h1:q39FwjFiRZn+Ux/tt+d3bJTmDtsQQWa+3SLYVo1vLfA= -go.unistack.org/micro-proto/v3 v3.1.0/go.mod h1:DpRhYCBXlmSJ/AAXTmntvlh7kQkYU6eFvlmYAx4BQS8= -go.unistack.org/micro/v3 v3.8.13 h1:9ibK5UNJ1mmxh5PNaNUUEUj86nvhoJyJaVhcg8DTncM= -go.unistack.org/micro/v3 v3.8.13/go.mod h1:s5cpmK2YqOpIsn5FTVxQaNCa66rHxO+WBDwdQKbcYlU= +go.unistack.org/micro-proto/v3 v3.1.1 h1:78qRmltwGek5kSQ9tNmDZ9TCRvZM7YDIOgzriKvabjA= +go.unistack.org/micro-proto/v3 v3.1.1/go.mod h1:DpRhYCBXlmSJ/AAXTmntvlh7kQkYU6eFvlmYAx4BQS8= +go.unistack.org/micro/v3 v3.8.14 h1:gvGAh11n484XuJFt+YFUvDJUwbn/a/6/NdTdTqeUnis= +go.unistack.org/micro/v3 v3.8.14/go.mod h1:zEbgew93bFhU+gANJubbbnPP1LtDTQRbM/17QXTbTrY= golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/stream.go b/stream.go index 7d2465c..5ecfe93 100644 --- a/stream.go +++ b/stream.go @@ -52,6 +52,10 @@ func (h *httpStream) Response() client.Response { return nil } +func (h *httpStream) SendMsg(msg interface{}) error { + return h.Send(msg) +} + func (h *httpStream) Send(msg interface{}) error { h.Lock() defer h.Unlock() @@ -69,6 +73,10 @@ func (h *httpStream) Send(msg interface{}) error { return hreq.Write(h.conn) } +func (h *httpStream) RecvMsg(msg interface{}) error { + return h.Recv(msg) +} + func (h *httpStream) Recv(msg interface{}) error { h.Lock() defer h.Unlock() @@ -93,6 +101,10 @@ func (h *httpStream) Error() error { return h.err } +func (h *httpStream) CloseSend() error { + return h.Close() +} + func (h *httpStream) Close() error { select { case <-h.closed: