refactor: narrow remaining storage compatibility exports (#3578)

This commit is contained in:
安正超
2026-06-18 19:18:32 +08:00
committed by GitHub
parent 08371a6e09
commit f3fcdd4ba2
6 changed files with 96 additions and 25 deletions
+7 -2
View File
@@ -12,7 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use rustfs_ecstore::{
pub(crate) mod ecstore {
#![allow(unused_imports)]
pub(crate) use rustfs_ecstore::{data_usage, disk, error, global, store, store_api};
}
pub(crate) use self::ecstore::{
data_usage::DATA_USAGE_CACHE_NAME,
disk::{BUCKET_META_PREFIX, DiskAPI, DiskStore, RUSTFS_META_BUCKET, endpoint::Endpoint, error::DiskError},
error::{Error as EcstoreError, StorageError},
@@ -22,7 +27,7 @@ pub(crate) use rustfs_ecstore::{
};
#[cfg(test)]
pub(crate) use rustfs_ecstore::disk::{DiskOption, new_disk};
pub(crate) use self::ecstore::disk::{DiskOption, new_disk};
pub type HealObjectInfo = EcstoreObjectInfo;
pub type HealObjectOptions = EcstoreObjectOptions;
+5 -3
View File
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use rustfs_ecstore::store_api::{ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions};
mod ecstore {
pub(super) use rustfs_ecstore::store_api;
}
pub(super) type IamObjectInfo = EcstoreObjectInfo;
pub(super) type IamObjectOptions = EcstoreObjectOptions;
pub(super) type IamObjectInfo = ecstore::store_api::ObjectInfo;
pub(super) type IamObjectOptions = ecstore::store_api::ObjectOptions;
+7 -2
View File
@@ -12,7 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use rustfs_ecstore::{
mod ecstore {
#![allow(unused_imports)]
pub(super) use rustfs_ecstore::{bucket, error, resolve_object_store_handle, store, store_api};
}
use self::ecstore::{
bucket::{metadata::BucketMetadata, metadata_sys},
error::Result as EcstoreResult,
store::ECStore,
@@ -29,7 +34,7 @@ pub type SwiftObjectOptions = EcstoreObjectOptions;
pub type SwiftPutObjReader = EcstorePutObjReader;
pub fn resolve_swift_object_store_handle() -> Option<Arc<ECStore>> {
rustfs_ecstore::resolve_object_store_handle()
ecstore::resolve_object_store_handle()
}
pub async fn get_swift_bucket_metadata(bucket: &str) -> EcstoreResult<Arc<BucketMetadata>> {
+11 -3
View File
@@ -13,7 +13,15 @@
// limitations under the License.
use http::HeaderMap;
pub(crate) use rustfs_ecstore::{
pub(crate) mod ecstore {
#![allow(unused_imports)]
pub(crate) use rustfs_ecstore::{
bucket, cache_value, config, data_usage, disk, error, global, pools, resolve_object_store_handle, set_disk, store,
store_api, store_utils,
};
}
pub(crate) use self::ecstore::{
bucket::{
bucket_target_sys::BucketTargetSys,
lifecycle::{
@@ -51,7 +59,7 @@ use rustfs_storage_api::{HTTPRangeSpec, ObjectIO};
use std::sync::Arc;
#[cfg(test)]
pub(crate) use rustfs_ecstore::{
pub(crate) use self::ecstore::{
config::init as init_ecstore_config_for_scanner_tests,
disk::{DiskOption, endpoint::Endpoint, new_disk},
};
@@ -63,7 +71,7 @@ pub type ScannerObjectToDelete = EcstoreObjectToDelete;
pub type ScannerPutObjReader = EcstorePutObjReader;
pub(crate) fn resolve_scanner_object_store_handle() -> Option<Arc<ECStore>> {
rustfs_ecstore::resolve_object_store_handle()
ecstore::resolve_object_store_handle()
}
pub trait ScannerObjectIO: