refactor: tighten storage compat store_api aliases (#3582)

* refactor: collapse storage compat store_api modules

* chore: guard storage compat store_api aliases
This commit is contained in:
安正超
2026-06-18 22:50:02 +08:00
committed by GitHub
parent c28fee0013
commit 205f964dc5
10 changed files with 119 additions and 66 deletions
+4 -12
View File
@@ -14,26 +14,18 @@
mod ecstore {
pub(super) use rustfs_ecstore::{bucket, error, resolve_object_store_handle, store};
pub(super) mod store_api {
pub(crate) use rustfs_ecstore::store_api::{GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader};
}
}
use self::ecstore::{
bucket::{metadata::BucketMetadata, metadata_sys},
error::Result as EcstoreResult,
store::ECStore,
store_api::{
GetObjectReader as EcstoreGetObjectReader, ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions,
PutObjReader as EcstorePutObjReader,
},
};
use std::sync::Arc;
pub type SwiftGetObjectReader = EcstoreGetObjectReader;
pub type SwiftObjectInfo = EcstoreObjectInfo;
pub type SwiftObjectOptions = EcstoreObjectOptions;
pub type SwiftPutObjReader = EcstorePutObjReader;
pub type SwiftGetObjectReader = rustfs_ecstore::store_api::GetObjectReader;
pub type SwiftObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
pub type SwiftObjectOptions = rustfs_ecstore::store_api::ObjectOptions;
pub type SwiftPutObjReader = rustfs_ecstore::store_api::PutObjReader;
pub fn resolve_swift_object_store_handle() -> Option<Arc<ECStore>> {
ecstore::resolve_object_store_handle()