syntax = "proto3";
|
option optimize_for = LITE_RUNTIME;
|
option go_package="./bhome_msg";
|
|
// public messages
|
import "error_msg.proto";
|
|
package bhome_msg;
|
|
message BHAddress {
|
uint64 mq_id = 1;
|
int64 abs_addr = 2;
|
bytes ip = 3;
|
int32 port = 4;
|
}
|
|
message ProcInfo
|
{
|
bytes proc_id = 1; // serial number, maybe managed
|
bytes name = 2;
|
bytes public_info = 3; // maybe json.
|
bytes private_info = 4;
|
}
|
|
message MsgTopicList {
|
repeated bytes topic_list = 1;
|
}
|
|
|
message MsgPublish {
|
bytes topic = 1;
|
bytes data = 2;
|
}
|
|
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 MsgUnregister
|
{
|
ProcInfo proc = 1;
|
}
|
|
message MsgHeartbeat
|
{
|
ProcInfo proc = 1;
|
}
|
|
message MsgQueryTopic {
|
bytes topic = 1;
|
}
|
|
message MsgQueryTopicReply {
|
ErrorMsg errmsg = 1;
|
|
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;
|
message Info {
|
ProcInfo proc = 1;
|
bool online = 2;
|
MsgTopicList service = 3;
|
MsgTopicList local_sub = 4;
|
MsgTopicList net_sub = 5;
|
}
|
repeated Info proc_list = 2;
|
}
|