move admin router to rustfs, add pool stats/list admin api

This commit is contained in:
weisd
2024-11-26 17:34:18 +08:00
parent b1510d1107
commit b79b967036
16 changed files with 295 additions and 103 deletions
+5 -2
View File
@@ -149,8 +149,11 @@ impl BucketMetadataSys {
}
async fn init_internal(&self, buckets: Vec<String>) -> Result<()> {
let count = {
let endpoints = GLOBAL_Endpoints.read().await;
endpoints.es_count() * 10
if let Some(endpoints) = GLOBAL_Endpoints.get() {
endpoints.es_count() * 10
} else {
return Err(Error::msg("GLOBAL_Endpoints not init"));
}
};
let mut failed_buckets: HashSet<String> = HashSet::new();