1 Star 1 Fork 0

王金胜 / best_rpc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
bestrpc.go 737 Bytes
一键复制 编辑 原始数据 按行查看 历史
王金胜 提交于 2023-08-23 09:40 . 新版7
// Code generated by goctl. DO NOT EDIT.
// Source: best_rpc.proto
package bestrpcclient
import (
"context"
"gitee.com/wang-jinsheng/best_rpc/best_rpc"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
Request = best_rpc.Request
Response = best_rpc.Response
BestRpc interface {
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
defaultBestRpc struct {
cli zrpc.Client
}
)
func NewBestRpc(cli zrpc.Client) BestRpc {
return &defaultBestRpc{
cli: cli,
}
}
func (m *defaultBestRpc) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
client := best_rpc.NewBestRpcClient(m.cli.Conn())
return client.Ping(ctx, in, opts...)
}
Go
1
https://gitee.com/wang-jinsheng/best_rpc.git
git@gitee.com:wang-jinsheng/best_rpc.git
wang-jinsheng
best_rpc
best_rpc
v1.0.7

搜索帮助