From acf384f3d6653f4696446b113177140f491c4e38 Mon Sep 17 00:00:00 2001
From: gongshangguo <gongshangguo@admin.com>
Date: 星期二, 12 四月 2022 09:58:10 +0800
Subject: [PATCH] 更新aiot
---
aiotProto/aiot/aiot_business.pb.micro.go | 72 ++++++++++++++++++++++++++++-------
1 files changed, 57 insertions(+), 15 deletions(-)
diff --git a/aiotProto/aiot/aiot_business.pb.micro.go b/aiotProto/aiot/aiot_business.pb.micro.go
index 42a897b..c24a633 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)
- SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*Protocol, error)
+ // 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
+ SendToNode(ctx context.Context, in *NodeReq, opts ...client.CallOption) (*BusinessReply, error)
+ // 鐩存帴鍙戦�佸悓姝cp璇锋眰
+ SendAiotSyncReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, 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 {
@@ -66,9 +72,29 @@
return out, nil
}
-func (c *aiotService) SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*Protocol, error) {
- req := c.c.NewRequest(c.name, "AiotService.SendAiotReq", in)
- out := new(Protocol)
+func (c *aiotService) SendAiotSyncReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error) {
+ req := c.c.NewRequest(c.name, "AiotService.SendAiotSyncReq", in)
+ out := new(BusinessReply)
+ err := c.c.Call(ctx, req, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ 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
@@ -79,14 +105,22 @@
// Server API for AiotService service
type AiotServiceHandler interface {
- GetBusiness(context.Context, *BusinessReq, *BusinessReply) error
- SendAiotReq(context.Context, *Protocol, *Protocol) error
+ // 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
+ SendToNode(context.Context, *NodeReq, *BusinessReply) error
+ // 鐩存帴鍙戦�佸悓姝cp璇锋眰
+ SendAiotSyncReq(context.Context, *Protocol, *BusinessReply) 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
- SendAiotReq(ctx context.Context, in *Protocol, out *Protocol) error
+ SendToNode(ctx context.Context, in *NodeReq, out *BusinessReply) error
+ SendAiotSyncReq(ctx context.Context, in *Protocol, out *BusinessReply) 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) SendAiotSyncReq(ctx context.Context, in *Protocol, out *BusinessReply) error {
+ return h.AiotServiceHandler.SendAiotSyncReq(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