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;
|
}
|