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.proto | 85 +++++++++++++++++++++++++++++++++++-------
1 files changed, 70 insertions(+), 15 deletions(-)
diff --git a/aiotProto/aiot/aiot_business.proto b/aiotProto/aiot/aiot_business.proto
index fe60454..2b6f0f1 100644
--- a/aiotProto/aiot/aiot_business.proto
+++ b/aiotProto/aiot/aiot_business.proto
@@ -12,44 +12,99 @@
Async = 1;
}
+// 璇锋眰鏂瑰紡
+enum RequestMethod{
+ // 榛樿
+ MethodDefault = 0;
+ // post璇锋眰
+ Post = 1;
+ // get璇锋眰
+ Get = 2;
+ // put璇锋眰
+ Put = 3;
+ // delete璇锋眰
+ Delete = 4;
+}
+
+// 璇锋眰header
+enum RequestContentType{
+ ContentTypeDefault = 0;
+ ApplicationJson = 1;
+ ApplicationXWwwFormUrlencoded = 2;
+ MultipartFormData = 3;
+ ApplicationXml = 4;
+}
+
// 璇锋眰鐨刡ody浣�
message NodeReq {
// 璇锋眰鐨則opic url
string topic = 1;
+ // 鑺傜偣ID
+ string nodeId = 2;
// token
- string authorization = 2;
+ string authorization = 3;
// 璇锋眰鎸囧悜鐨刬p
- string ip = 3;
+ string ip = 4;
// 璇锋眰鐨勭鍙� 淇濈暀瀛楁
- string port = 4;
+ string port = 5;
// 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
- RequestType syncType = 5;
+ RequestType syncType = 6;
+ // method
+ RequestMethod method = 7;
+ // content-type
+ RequestContentType contentType = 8;
// 璇锋眰涓氬姟鍙傛暟
- bytes req = 6;
+ bytes req = 9;
}
// 闆嗙兢璇锋眰鍙傛暟
message ClusterReq{
+ // 璇锋眰鐨則opic url
+ string topic = 1;
// 闆嗙兢ID
- string ClusterId = 1;
+ string clusterId = 2;
// token
- string authorization = 2;
+ string authorization = 3;
// 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
- RequestType syncType = 3;
+ RequestType syncType = 4;
+ // method
+ RequestMethod method = 5;
+ // content-type
+ RequestContentType contentType = 6;
// 璇锋眰涓氬姟鍙傛暟
- bytes req = 4;
+ bytes req = 7;
}
// 璁惧鍒楄〃璇锋眰鍙傛暟
message NodesReq{
+ // 璇锋眰鐨則opic url
+ string topic = 1;
// 璁惧鍒楄〃ID
- repeated string NodeIds = 1;
+ repeated string nodeIds = 2;
// token
- string authorization = 2;
+ string authorization = 3;
// 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
- RequestType syncType = 3;
+ RequestType syncType = 4;
+ // method
+ RequestMethod method = 5;
+ // content-type
+ RequestContentType contentType = 6;
// 璇锋眰涓氬姟鍙傛暟
- bytes req = 4;
+ bytes req = 7;
+}
+
+// 璇锋眰鍒皊aas
+message SaasReq {
+ // 璇锋眰鐨則opic url
+ string rpcAddr = 1;
+ // rpc妯″潡鍚�
+ string rpcNode = 2;
+ // token
+ string authorization = 3;
+ // 璇锋眰鐨勫悓姝�/寮傛绫诲瀷
+ RequestType syncType = 4;
+ // 璇锋眰涓氬姟鍙傛暟
+ bytes req = 5;
}
// 鍝嶅簲鐨刡ody浣�
@@ -68,8 +123,8 @@
service AiotService {
// 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
rpc SendToNode(NodeReq) returns (BusinessReply){}
- // 鐩存帴鍙戦�乼cp璇锋眰
- rpc SendAiotReq(Protocol) returns (Protocol){}
+ // 鐩存帴鍙戦�佸悓姝cp璇锋眰
+ rpc SendAiotSyncReq(Protocol) returns (BusinessReply){}
// 鍙戦�佺兢缁勮姹�
rpc SendToCluster(ClusterReq) returns (BusinessReply){}
// 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
--
Gitblit v1.8.0