mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 10:43:15 +00:00
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:
@@ -14,10 +14,6 @@
|
||||
|
||||
pub(crate) mod ecstore {
|
||||
pub(crate) use rustfs_ecstore::{data_usage, disk, error, global, store};
|
||||
|
||||
pub(crate) mod store_api {
|
||||
pub(crate) use rustfs_ecstore::store_api::{ObjectInfo, ObjectOptions, PutObjReader};
|
||||
}
|
||||
}
|
||||
pub(crate) use self::ecstore::{
|
||||
data_usage::DATA_USAGE_CACHE_NAME,
|
||||
@@ -25,12 +21,11 @@ pub(crate) use self::ecstore::{
|
||||
error::{Error as EcstoreError, StorageError},
|
||||
global::GLOBAL_LOCAL_DISK_MAP,
|
||||
store::ECStore,
|
||||
store_api::{ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions, PutObjReader as EcstorePutObjReader},
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use self::ecstore::disk::{DiskOption, new_disk};
|
||||
|
||||
pub type HealObjectInfo = EcstoreObjectInfo;
|
||||
pub type HealObjectOptions = EcstoreObjectOptions;
|
||||
pub type HealPutObjReader = EcstorePutObjReader;
|
||||
pub type HealObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
|
||||
pub type HealObjectOptions = rustfs_ecstore::store_api::ObjectOptions;
|
||||
pub type HealPutObjReader = rustfs_ecstore::store_api::PutObjReader;
|
||||
|
||||
@@ -12,11 +12,5 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
mod ecstore {
|
||||
pub(super) mod store_api {
|
||||
pub(crate) use rustfs_ecstore::store_api::{ObjectInfo, ObjectOptions};
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) type IamObjectInfo = ecstore::store_api::ObjectInfo;
|
||||
pub(super) type IamObjectOptions = ecstore::store_api::ObjectOptions;
|
||||
pub(super) type IamObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
|
||||
pub(super) type IamObjectOptions = rustfs_ecstore::store_api::ObjectOptions;
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
|
||||
pub(crate) mod ecstore {
|
||||
pub(crate) use rustfs_ecstore::{config, global};
|
||||
|
||||
pub(crate) mod store_api {
|
||||
pub(crate) use rustfs_ecstore::store_api::ObjectInfo;
|
||||
}
|
||||
}
|
||||
|
||||
pub type NotifyObjectInfo = ecstore::store_api::ObjectInfo;
|
||||
pub type NotifyObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -14,16 +14,8 @@
|
||||
|
||||
pub(crate) mod ecstore {
|
||||
pub(crate) use rustfs_ecstore::{error, resolve_object_store_handle, set_disk, store};
|
||||
|
||||
pub(crate) mod store_api {
|
||||
pub(crate) use rustfs_ecstore::store_api::{GetObjectReader, ObjectInfo, ObjectOptions};
|
||||
}
|
||||
}
|
||||
|
||||
use ecstore::store_api::{
|
||||
GetObjectReader as EcstoreGetObjectReader, ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions,
|
||||
};
|
||||
|
||||
pub(crate) type SelectGetObjectReader = EcstoreGetObjectReader;
|
||||
pub(crate) type SelectObjectInfo = EcstoreObjectInfo;
|
||||
pub(crate) type SelectObjectOptions = EcstoreObjectOptions;
|
||||
pub(crate) type SelectGetObjectReader = rustfs_ecstore::store_api::GetObjectReader;
|
||||
pub(crate) type SelectObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
|
||||
pub(crate) type SelectObjectOptions = rustfs_ecstore::store_api::ObjectOptions;
|
||||
|
||||
@@ -18,10 +18,6 @@ pub(crate) mod ecstore {
|
||||
bucket, cache_value, config, data_usage, disk, error, global, pools, resolve_object_store_handle, set_disk, store,
|
||||
store_utils,
|
||||
};
|
||||
|
||||
pub(crate) mod store_api {
|
||||
pub(crate) use rustfs_ecstore::store_api::{GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader};
|
||||
}
|
||||
}
|
||||
pub(crate) use self::ecstore::{
|
||||
bucket::{
|
||||
@@ -51,10 +47,6 @@ pub(crate) use self::ecstore::{
|
||||
pools::{path2_bucket_object, path2_bucket_object_with_base_path},
|
||||
set_disk::SetDisks,
|
||||
store::ECStore,
|
||||
store_api::{
|
||||
GetObjectReader as EcstoreGetObjectReader, ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions,
|
||||
PutObjReader as EcstorePutObjReader,
|
||||
},
|
||||
store_utils::is_reserved_or_invalid_bucket,
|
||||
};
|
||||
use rustfs_storage_api::{HTTPRangeSpec, ObjectIO, ObjectToDelete};
|
||||
@@ -66,11 +58,11 @@ pub(crate) use self::ecstore::{
|
||||
disk::{DiskOption, endpoint::Endpoint, new_disk},
|
||||
};
|
||||
|
||||
pub type ScannerGetObjectReader = EcstoreGetObjectReader;
|
||||
pub type ScannerObjectInfo = EcstoreObjectInfo;
|
||||
pub type ScannerObjectOptions = EcstoreObjectOptions;
|
||||
pub type ScannerGetObjectReader = rustfs_ecstore::store_api::GetObjectReader;
|
||||
pub type ScannerObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
|
||||
pub type ScannerObjectOptions = rustfs_ecstore::store_api::ObjectOptions;
|
||||
pub type ScannerObjectToDelete = ObjectToDelete;
|
||||
pub type ScannerPutObjReader = EcstorePutObjReader;
|
||||
pub type ScannerPutObjReader = rustfs_ecstore::store_api::PutObjReader;
|
||||
|
||||
pub(crate) fn resolve_scanner_object_store_handle() -> Option<Arc<ECStore>> {
|
||||
ecstore::resolve_object_store_handle()
|
||||
|
||||
Reference in New Issue
Block a user