Merge pull request #89 from rustfs/adm-api-1

feat: introduce admin-api
This commit is contained in:
loverustfs
2024-10-16 20:41:24 +08:00
committed by GitHub
14 changed files with 392 additions and 56 deletions
+6
View File
@@ -58,4 +58,10 @@ pub async fn update_erasure_type(setup_type: SetupType) {
*is_erasure_sd = setup_type == SetupType::ErasureSD;
}
pub async fn is_legacy() -> bool {
let lock = GLOBAL_Endpoints.read().await;
let endpoints = lock.as_ref();
endpoints.len() == 1 && endpoints[0].legacy
}
type TypeLocalDiskSetDrives = Vec<Vec<Vec<Option<DiskStore>>>>;
+1
View File
@@ -19,6 +19,7 @@ mod utils;
pub mod bucket;
pub use global::is_legacy;
pub use global::new_object_layer_fn;
pub use global::set_global_endpoints;
pub use global::update_erasure_type;