Skip to content

Commit 9b272c5

Browse files
feat: heartbeat response of "suspend"
1 parent 0df99f0 commit 9b272c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/v1/meta.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ impl ResponseHeader {
123123
pub enum ErrorCode {
124124
NotEnoughAvailableDatanodes = 1,
125125
NotLeader = 2,
126+
Suspend = 3,
126127
}
127128

128129
impl Error {
@@ -143,6 +144,13 @@ impl Error {
143144
err_msg: "Current server is not leader".to_string(),
144145
}
145146
}
147+
148+
pub fn suspend() -> Self {
149+
Self {
150+
code: ErrorCode::Suspend as i32,
151+
err_msg: "suspend".to_string(),
152+
}
153+
}
146154
}
147155

148156
impl HeartbeatResponse {

0 commit comments

Comments
 (0)