lichao
2021-04-08 c338820e4db43ad32c20ff429a038b06bcb980f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
 
// public messages
import "error_msg.proto";
 
package bhome.msg;
 
message BHAddress {
    bytes mq_id = 1; // mqid, uuid
    // bytes ip = 2;   //
    // int32 port = 3;
}
 
message ProcInfo
{
    bytes proc_id = 1; // serial number, maybe managed
    bytes name = 2;
    bytes public_info = 3; // maybe json.
    bytes private_info = 4; 
}
 
message MsgPublish {
    bytes topic = 1;
    bytes data = 2; 
}
 
message MsgSubscribe {
    repeated bytes topics = 1;
}
message MsgUnsubscribe {
    repeated bytes topics = 1;
}
 
message MsgCommonReply {
    ErrorMsg errmsg = 1;
}
 
message MsgRequestTopic {
    bytes topic = 1;
    bytes data = 2; 
}
 
message MsgRequestTopicReply {
    ErrorMsg errmsg = 1;
    bytes data = 2; 
}
 
message MsgRegister
{
    ProcInfo proc = 1;
}
 
message MsgRegisterRPC
{
    repeated bytes topics = 1;
}
 
message MsgHeartbeat
{
    ProcInfo proc = 1;
}
 
message MsgQueryTopic {
    bytes topic = 1;
}
 
message MsgQueryTopicReply {
    ErrorMsg errmsg = 1;
    BHAddress address = 2;
}