support some peer rest api

Signed-off-by: mujunxiang <1948535941@qq.com>
This commit is contained in:
mujunxiang
2024-11-27 14:21:26 +08:00
parent 5cc138e23d
commit 1b9ae3ccb3
16 changed files with 1482 additions and 68 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ async fn init_background_healing() {
.await;
}
async fn get_local_disks_to_heal() -> Vec<Endpoint> {
pub async fn get_local_disks_to_heal() -> Vec<Endpoint> {
let mut disks_to_heal = Vec::new();
for (_, disk) in GLOBAL_LOCAL_DISK_MAP.read().await.iter() {
if let Some(disk) = disk {
+4 -4
View File
@@ -190,19 +190,19 @@ impl HealSequence {
}
impl HealSequence {
fn _get_scanned_items_count(&self) -> usize {
pub fn get_scanned_items_count(&self) -> usize {
self.scanned_items_map.values().sum()
}
fn _get_scanned_items_map(&self) -> ItemsMap {
pub fn _get_scanned_items_map(&self) -> ItemsMap {
self.scanned_items_map.clone()
}
fn _get_healed_items_map(&self) -> ItemsMap {
pub fn _get_healed_items_map(&self) -> ItemsMap {
self.healed_items_map.clone()
}
fn _get_heal_failed_items_map(&self) -> ItemsMap {
pub fn _get_heal_failed_items_map(&self) -> ItemsMap {
self.heal_failed_items_map.clone()
}