feat: rpc message based heartbeat (#30)
* feat: rpc message based heartbeat * chore: by cr
This commit is contained in:
@@ -32,6 +32,7 @@ message HeartbeatRequest {
|
||||
repeated RegionStat region_stats = 6;
|
||||
// Follower nodes and stats, empty on follower nodes
|
||||
repeated ReplicaStat replica_stats = 7;
|
||||
repeated MailboxMessage mailbox_messages = 8;
|
||||
}
|
||||
|
||||
message NodeStat {
|
||||
@@ -80,7 +81,7 @@ message ReplicaStat {
|
||||
message HeartbeatResponse {
|
||||
ResponseHeader header = 1;
|
||||
|
||||
repeated bytes payload = 2;
|
||||
repeated MailboxMessage mailbox_messages = 2;
|
||||
}
|
||||
|
||||
message AskLeaderRequest {
|
||||
@@ -92,3 +93,19 @@ message AskLeaderResponse {
|
||||
|
||||
Peer leader = 2;
|
||||
}
|
||||
|
||||
message MailboxMessage {
|
||||
// The id is used to associate request and response.
|
||||
uint64 id = 1;
|
||||
// The following information plays a bigger role in making messages traceable and facilitating debugging.
|
||||
string subject = 2;
|
||||
string from = 3;
|
||||
string to = 4;
|
||||
// The unix timestamp in milliseconds.
|
||||
int64 timestamp_millis = 5;
|
||||
|
||||
// The message body.
|
||||
oneof payload {
|
||||
string json = 6;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user