Ai
1 Star 0 Fork 0

蒙蒙的男孩/eosc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
grpc.go 859 Bytes
一键复制 编辑 原始数据 按行查看 历史
蒙蒙的男孩 提交于 2024-01-10 13:49 +08:00 . 重定义项目地址
package eoscli
import (
"io"
"gitee.com/meng_mengs_boys/eosc"
grpc_unixsocket "gitee.com/meng_mengs_boys/eosc/grpc-unixsocket"
"gitee.com/meng_mengs_boys/eosc/service"
)
type ICtiServiceClient interface {
service.CtiServiceClient
io.Closer
}
type ctlServiceClient struct {
service.CtiServiceClient
conn io.Closer
}
func newCtlServiceClient(ctiServiceClient service.CtiServiceClient, conn io.Closer) *ctlServiceClient {
return &ctlServiceClient{CtiServiceClient: ctiServiceClient, conn: conn}
}
func (c *ctlServiceClient) Close() error {
return c.conn.Close()
}
func createCtlServiceClient(pid int) (ICtiServiceClient, error) {
conn, err := grpc_unixsocket.Connect(service.ServerAddr(pid, eosc.ProcessMaster))
if err != nil {
return nil, err
}
client := service.NewCtiServiceClient(conn)
return newCtlServiceClient(client, conn), nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/meng_mengs_boys/eosc.git
git@gitee.com:meng_mengs_boys/eosc.git
meng_mengs_boys
eosc
eosc
v1.15.7

搜索帮助