This commit is contained in:
junxiang Mu
2024-10-15 10:29:05 +08:00
parent 7723419142
commit e4f5ca7ea8
18 changed files with 2204 additions and 474 deletions
+12 -1
View File
@@ -1,6 +1,12 @@
use std::collections::HashMap;
use crate::error::{Error, Result};
use crate::{
error::{Error, Result},
heal::{
heal_commands::{HealOpts, HealResultItem},
heal_ops::HealObjectFn,
},
};
use futures::StreamExt;
use http::HeaderMap;
use rmp_serde::Serializer;
@@ -601,4 +607,9 @@ pub trait StorageAPI: ObjectIO {
uploaded_parts: Vec<CompletePart>,
opts: &ObjectOptions,
) -> Result<ObjectInfo>;
async fn heal_format(&self, dry_run: bool) -> Result<HealResultItem>;
async fn heal_bucket(&self, bucket: &str, opts: &HealOpts) -> Result<HealResultItem>;
async fn heal_object(&self, bucket: &str, object: &str, version_id: &str, opts: &HealOpts) -> Result<HealResultItem>;
async fn heal_objects(&self, bucket: &str, prefix: &str, opts: &HealOpts, func: HealObjectFn) -> Result<()>;
async fn check_abandoned_parts(&self, bucket: &str, object: &str, opts: &HealOpts) -> Result<()>;
}