From cb8a046f1d84198b6bbddb1481667b905ea522bf Mon Sep 17 00:00:00 2001
From: gongshangguo <gongshangguo@admin.com>
Date: 星期三, 02 三月 2022 17:08:31 +0800
Subject: [PATCH] 业务端口类型
---
aiotProto/aiot/aiot_business.pb.micro.go | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 49 insertions(+), 7 deletions(-)
diff --git a/aiotProto/aiot/aiot_business.pb.micro.go b/aiotProto/aiot/aiot_business.pb.micro.go
index 42a897b..5fd9e02 100644
--- a/aiotProto/aiot/aiot_business.pb.micro.go
+++ b/aiotProto/aiot/aiot_business.pb.micro.go
@@ -34,8 +34,14 @@
// Client API for AiotService service
type AiotService interface {
- GetBusiness(ctx context.Context, in *BusinessReq, opts ...client.CallOption) (*BusinessReply, error)
+ // 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
+ SendToNode(ctx context.Context, in *NodeReq, opts ...client.CallOption) (*BusinessReply, error)
+ // 鐩存帴鍙戦�乼cp璇锋眰
SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*Protocol, error)
+ // 鍙戦�佺兢缁勮姹�
+ SendToCluster(ctx context.Context, in *ClusterReq, opts ...client.CallOption) (*BusinessReply, error)
+ // 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
+ SendToNodes(ctx context.Context, in *NodesReq, opts ...client.CallOption) (*BusinessReply, error)
}
type aiotService struct {
@@ -56,8 +62,8 @@
}
}
-func (c *aiotService) GetBusiness(ctx context.Context, in *BusinessReq, opts ...client.CallOption) (*BusinessReply, error) {
- req := c.c.NewRequest(c.name, "AiotService.GetBusiness", in)
+func (c *aiotService) SendToNode(ctx context.Context, in *NodeReq, opts ...client.CallOption) (*BusinessReply, error) {
+ req := c.c.NewRequest(c.name, "AiotService.SendToNode", in)
out := new(BusinessReply)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
@@ -76,17 +82,45 @@
return out, nil
}
+func (c *aiotService) SendToCluster(ctx context.Context, in *ClusterReq, opts ...client.CallOption) (*BusinessReply, error) {
+ req := c.c.NewRequest(c.name, "AiotService.SendToCluster", in)
+ out := new(BusinessReply)
+ err := c.c.Call(ctx, req, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aiotService) SendToNodes(ctx context.Context, in *NodesReq, opts ...client.CallOption) (*BusinessReply, error) {
+ req := c.c.NewRequest(c.name, "AiotService.SendToNodes", in)
+ out := new(BusinessReply)
+ err := c.c.Call(ctx, req, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// Server API for AiotService service
type AiotServiceHandler interface {
- GetBusiness(context.Context, *BusinessReq, *BusinessReply) error
+ // 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
+ SendToNode(context.Context, *NodeReq, *BusinessReply) error
+ // 鐩存帴鍙戦�乼cp璇锋眰
SendAiotReq(context.Context, *Protocol, *Protocol) error
+ // 鍙戦�佺兢缁勮姹�
+ SendToCluster(context.Context, *ClusterReq, *BusinessReply) error
+ // 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
+ SendToNodes(context.Context, *NodesReq, *BusinessReply) error
}
func RegisterAiotServiceHandler(s server.Server, hdlr AiotServiceHandler, opts ...server.HandlerOption) error {
type aiotService interface {
- GetBusiness(ctx context.Context, in *BusinessReq, out *BusinessReply) error
+ SendToNode(ctx context.Context, in *NodeReq, out *BusinessReply) error
SendAiotReq(ctx context.Context, in *Protocol, out *Protocol) error
+ SendToCluster(ctx context.Context, in *ClusterReq, out *BusinessReply) error
+ SendToNodes(ctx context.Context, in *NodesReq, out *BusinessReply) error
}
type AiotService struct {
aiotService
@@ -99,10 +133,18 @@
AiotServiceHandler
}
-func (h *aiotServiceHandler) GetBusiness(ctx context.Context, in *BusinessReq, out *BusinessReply) error {
- return h.AiotServiceHandler.GetBusiness(ctx, in, out)
+func (h *aiotServiceHandler) SendToNode(ctx context.Context, in *NodeReq, out *BusinessReply) error {
+ return h.AiotServiceHandler.SendToNode(ctx, in, out)
}
func (h *aiotServiceHandler) SendAiotReq(ctx context.Context, in *Protocol, out *Protocol) error {
return h.AiotServiceHandler.SendAiotReq(ctx, in, out)
}
+
+func (h *aiotServiceHandler) SendToCluster(ctx context.Context, in *ClusterReq, out *BusinessReply) error {
+ return h.AiotServiceHandler.SendToCluster(ctx, in, out)
+}
+
+func (h *aiotServiceHandler) SendToNodes(ctx context.Context, in *NodesReq, out *BusinessReply) error {
+ return h.AiotServiceHandler.SendToNodes(ctx, in, out)
+}
--
Gitblit v1.8.0