1 Star 0 Fork 0

TGodfather / go-plugins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
stream.go 617 Bytes
一键复制 编辑 原始数据 按行查看 历史
tanzhuokang 提交于 2020-08-16 10:55 . first commit
package jrpc
import (
"context"
"github.com/micro/go-micro/v2/server"
"google.golang.org/grpc"
)
// rpcStream implements a server side Stream.
type rpcStream struct {
s grpc.ServerStream
request server.Request
}
func (r *rpcStream) Close() error {
return nil
}
func (r *rpcStream) Error() error {
return nil
}
func (r *rpcStream) Request() server.Request {
return r.request
}
func (r *rpcStream) Context() context.Context {
return r.s.Context()
}
func (r *rpcStream) Send(m interface{}) error {
return r.s.SendMsg(m)
}
func (r *rpcStream) Recv(m interface{}) error {
return r.s.RecvMsg(m)
}
Go
1
https://gitee.com/tgodfather/go-plugins.git
git@gitee.com:tgodfather/go-plugins.git
tgodfather
go-plugins
go-plugins
efc0651a8291

搜索帮助

53164aa7 5694891 3bd8fe86 5694891