aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-06 16:21:01 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-10 13:25:10 +0200
commit01c4876fb447b70106e934ad09cf9b921f33682a (patch)
tree59d7d75243ceefa02002e2a681b5d1683e25da6c /src/api
parente4c61124d875574ec7c2969a3a3056b69eade3af (diff)
downloadgarage-01c4876fb447b70106e934ad09cf9b921f33682a.tar.gz
garage-01c4876fb447b70106e934ad09cf9b921f33682a.zip
Specify remaining cluster-related endpoints
Diffstat (limited to 'src/api')
-rw-r--r--src/api/admin/cluster.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs
index f4835648..0eb754ac 100644
--- a/src/api/admin/cluster.rs
+++ b/src/api/admin/cluster.rs
@@ -52,6 +52,7 @@ fn get_cluster_layout(garage: &Arc<Garage>) -> GetClusterLayoutResponse {
let layout = garage.system.get_cluster_layout();
GetClusterLayoutResponse {
+ version: layout.version,
roles: layout
.roles
.items()
@@ -78,6 +79,7 @@ struct GetClusterStatusResponse {
#[derive(Serialize)]
struct GetClusterLayoutResponse {
+ version: u64,
roles: HashMap<String, Option<NodeRole>>,
#[serde(rename = "stagedRoleChanges")]
staged_role_changes: HashMap<String, Option<NodeRole>>,