sync s3s rustfs branch, fix versiong config

This commit is contained in:
weisd
2024-11-29 14:58:40 +08:00
parent 82a6d529c1
commit bbc76302a2
5 changed files with 112 additions and 40 deletions
+12 -9
View File
@@ -7,6 +7,9 @@ use tracing::warn;
pub struct BucketVersioningSys {}
impl BucketVersioningSys {
pub fn new() -> Self {
Self {}
}
pub async fn enabled(bucket: &str) -> bool {
match Self::get(bucket).await {
Ok(res) => res.enabled(),
@@ -27,15 +30,15 @@ impl BucketVersioningSys {
}
}
// pub async fn suspended(bucket: &str) -> bool {
// match Self::get(bucket).await {
// Ok(res) => res.suspended(),
// Err(err) => {
// warn!("{:?}", err);
// false
// }
// }
// }
pub async fn suspended(bucket: &str) -> bool {
match Self::get(bucket).await {
Ok(res) => res.suspended(),
Err(err) => {
warn!("{:?}", err);
false
}
}
}
pub async fn prefix_suspended(bucket: &str, prefix: &str) -> bool {
match Self::get(bucket).await {