aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/cluster.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-06-14 17:13:41 +0200
committerAlex Auvolat <alex@adnab.me>2023-06-14 17:19:25 +0200
commit8ef42c9609bcefc642cc9739acb921dffba49b89 (patch)
tree5d479c3ad3951d5d44cea5c2e033b506733c4f0f /src/api/admin/cluster.rs
parenta83a092c032058728f191119de99f38844aa74f5 (diff)
downloadgarage-8ef42c9609bcefc642cc9739acb921dffba49b89.tar.gz
garage-8ef42c9609bcefc642cc9739acb921dffba49b89.zip
admin docs: reformatting, key admin: add check
Diffstat (limited to 'src/api/admin/cluster.rs')
-rw-r--r--src/api/admin/cluster.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs
index ae4a1cc3..c8107b82 100644
--- a/src/api/admin/cluster.rs
+++ b/src/api/admin/cluster.rs
@@ -1,7 +1,7 @@
use std::net::SocketAddr;
use std::sync::Arc;
-use hyper::{Body, Request, Response, StatusCode};
+use hyper::{Body, Request, Response};
use serde::{Deserialize, Serialize};
use garage_util::crdt::*;
@@ -161,8 +161,8 @@ struct GetClusterStatusResponse {
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct ApplyClusterLayoutResponse {
- message: Vec<String>,
- layout: GetClusterLayoutResponse,
+ message: Vec<String>,
+ layout: GetClusterLayoutResponse,
}
#[derive(Serialize)]
@@ -238,7 +238,7 @@ pub async fn handle_update_cluster_layout(
garage.system.update_cluster_layout(&layout).await?;
let res = format_cluster_layout(&layout);
- Ok(json_ok_response(&res)?)
+ Ok(json_ok_response(&res)?)
}
pub async fn handle_apply_cluster_layout(
@@ -253,10 +253,10 @@ pub async fn handle_apply_cluster_layout(
garage.system.update_cluster_layout(&layout).await?;
let res = ApplyClusterLayoutResponse {
- message: msg,
- layout: format_cluster_layout(&layout),
- };
- Ok(json_ok_response(&res)?)
+ message: msg,
+ layout: format_cluster_layout(&layout),
+ };
+ Ok(json_ok_response(&res)?)
}
pub async fn handle_revert_cluster_layout(
@@ -270,7 +270,7 @@ pub async fn handle_revert_cluster_layout(
garage.system.update_cluster_layout(&layout).await?;
let res = format_cluster_layout(&layout);
- Ok(json_ok_response(&res)?)
+ Ok(json_ok_response(&res)?)
}
// ----