refactor: move object operation contracts (#3559)

This commit is contained in:
安正超
2026-06-18 09:48:13 +08:00
committed by GitHub
parent 3fb4cb3d65
commit e5cad7ed20
34 changed files with 529 additions and 200 deletions
+10 -2
View File
@@ -1069,7 +1069,7 @@ pub async fn store_data_usage_in_backend(
#[cfg(test)]
mod tests {
use super::*;
use rustfs_ecstore::store_api::{GetObjectReader, ObjectIO, ObjectInfo, ObjectOptions, PutObjReader};
use rustfs_ecstore::store_api::{GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader};
use serial_test::serial;
use std::collections::HashMap;
use std::io::Cursor;
@@ -1119,7 +1119,15 @@ mod tests {
}
#[async_trait::async_trait]
impl ObjectIO for MemoryConfigStore {
impl rustfs_storage_api::ObjectIO for MemoryConfigStore {
type Error = rustfs_ecstore::error::Error;
type RangeSpec = rustfs_storage_api::HTTPRangeSpec;
type HeaderMap = http::HeaderMap;
type ObjectOptions = ObjectOptions;
type ObjectInfo = ObjectInfo;
type GetObjectReader = GetObjectReader;
type PutObjectReader = PutObjReader;
async fn get_object_reader(
&self,
bucket: &str,
@@ -28,7 +28,7 @@ use rustfs_ecstore::{
global::GLOBAL_TierConfigMgr,
pools::path2_bucket_object_with_base_path,
store::ECStore,
store_api::{MultipartOperations, ObjectIO, ObjectOperations, ObjectOptions, PutObjReader},
store_api::{ObjectOptions, PutObjReader},
tier::{
tier_config::{TierConfig, TierMinIO, TierType},
warm_backend::{WarmBackend, WarmBackendGetOpts, build_transition_put_options},
@@ -38,8 +38,9 @@ use rustfs_filemeta::FileMeta;
use rustfs_scanner::scanner::init_data_scanner;
use rustfs_scanner::scanner_folder::ScannerItem;
use rustfs_scanner::scanner_io::ScannerIODisk;
use rustfs_storage_api::ListOperations as _;
use rustfs_storage_api::{BucketOperations, MakeBucketOptions};
use rustfs_storage_api::{
BucketOperations, ListOperations as _, MakeBucketOptions, MultipartOperations as _, ObjectIO as _, ObjectOperations as _,
};
use rustfs_utils::path::path_join_buf;
use s3s::dto::RestoreRequest;
use serial_test::serial;