From c0d61292ef6bdd8e2e93525b5df6a8ec5c017c32 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期五, 14 五月 2021 14:09:27 +0800
Subject: [PATCH] change refcount, avoid ShmMsgQueue AddRef on send.
---
proto/source/bhome_msg_api.proto | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/proto/source/bhome_msg_api.proto b/proto/source/bhome_msg_api.proto
index 82b8115..94bc82e 100644
--- a/proto/source/bhome_msg_api.proto
+++ b/proto/source/bhome_msg_api.proto
@@ -1,15 +1,16 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
+option go_package="./bhome_msg";
// public messages
import "error_msg.proto";
-package bhome.msg;
+package bhome_msg;
message BHAddress {
- bytes mq_id = 1; // mqid, uuid
- // bytes ip = 2; //
- // int32 port = 3;
+ uint64 mq_id = 1;
+ bytes ip = 2;
+ int32 port = 3;
}
message ProcInfo
@@ -20,16 +21,14 @@
bytes private_info = 4;
}
+message MsgTopicList {
+ repeated bytes topic_list = 1;
+}
+
+
message MsgPublish {
bytes topic = 1;
bytes data = 2;
-}
-
-message MsgSubscribe {
- repeated bytes topics = 1;
-}
-message MsgUnsubscribe {
- repeated bytes topics = 1;
}
message MsgCommonReply {
@@ -49,11 +48,12 @@
message MsgRegister
{
ProcInfo proc = 1;
+ repeated BHAddress addrs = 2;
}
-message MsgRegisterRPC
+message MsgUnregister
{
- repeated bytes topics = 1;
+ ProcInfo proc = 1;
}
message MsgHeartbeat
@@ -67,5 +67,19 @@
message MsgQueryTopicReply {
ErrorMsg errmsg = 1;
- BHAddress address = 2;
+
+message BHNodeAddress {
+ bytes proc_id = 1;
+ BHAddress addr = 2;
+}
+ repeated BHNodeAddress node_address = 2;
+}
+
+message MsgQueryProc {
+ bytes proc_id = 1;
+}
+
+message MsgQueryProcReply {
+ ErrorMsg errmsg = 1;
+ repeated ProcInfo proc = 2;
}
--
Gitblit v1.8.0