From d3d05d0eecdd76e86eeb3d28dcd765db042dce17 Mon Sep 17 00:00:00 2001
From: gongshangguo <gongshangguo@admin.com>
Date: 星期四, 03 三月 2022 10:46:05 +0800
Subject: [PATCH] 修改获取消息ID方法

---
 aiotProto/aiot/aiot_business.proto |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/aiotProto/aiot/aiot_business.proto b/aiotProto/aiot/aiot_business.proto
index 304ca19..fe60454 100644
--- a/aiotProto/aiot/aiot_business.proto
+++ b/aiotProto/aiot/aiot_business.proto
@@ -4,24 +4,74 @@
 
 import "aiot_common.proto";
 
+// 璇锋眰绫诲瀷
+enum RequestType{
+    // 鍚屾璇锋眰 榛樿
+    sync = 0;
+    // 寮傛璇锋眰
+    Async = 1;
+}
+
 // 璇锋眰鐨刡ody浣�
-message BusinessReq {
+message NodeReq {
+    // 璇锋眰鐨則opic url
     string topic = 1;
+    // token
     string authorization = 2;
+    // 璇锋眰鎸囧悜鐨刬p
     string ip = 3;
-    int32 port = 4;
-    bytes req = 5;
+    // 璇锋眰鐨勭鍙� 淇濈暀瀛楁
+    string port = 4;
+    // 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
+    RequestType syncType = 5;
+    // 璇锋眰涓氬姟鍙傛暟
+    bytes req = 6;
+}
+
+// 闆嗙兢璇锋眰鍙傛暟
+message ClusterReq{
+    // 闆嗙兢ID
+    string ClusterId = 1;
+    // token
+    string authorization = 2;
+    // 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
+    RequestType syncType = 3;
+    // 璇锋眰涓氬姟鍙傛暟
+    bytes req = 4;
+}
+
+// 璁惧鍒楄〃璇锋眰鍙傛暟
+message NodesReq{
+    // 璁惧鍒楄〃ID
+    repeated string NodeIds = 1;
+    // token
+    string authorization = 2;
+    // 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
+    RequestType syncType = 3;
+    // 璇锋眰涓氬姟鍙傛暟
+    bytes req = 4;
 }
 
 // 鍝嶅簲鐨刡ody浣�
 message BusinessReply {
+    // 杩斿洖鐨勯敊璇爜
     int32 code = 1;
+    // 閿欒淇℃伅
     string msg = 2;
+    // 鏄惁success
     bool success = 3;
+    // 杩斿洖缁撴灉
     bytes data = 4;
 }
 
+// 鏈嶅姟
 service AiotService {
-    rpc GetBusiness(BusinessReq) returns (BusinessReply){}
+    // 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
+    rpc SendToNode(NodeReq) returns (BusinessReply){}
+    // 鐩存帴鍙戦�乼cp璇锋眰
     rpc SendAiotReq(Protocol) returns (Protocol){}
+    // 鍙戦�佺兢缁勮姹�
+    rpc SendToCluster(ClusterReq) returns (BusinessReply){}
+    // 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
+    rpc SendToNodes(NodesReq) returns (BusinessReply) {}
 }

--
Gitblit v1.8.0