refactor: segment external storage contract imports (#3908)

This commit is contained in:
Zhengchao An
2026-06-26 16:44:59 +08:00
committed by GitHub
parent 6efbfff2c5
commit 72ae43cb90
13 changed files with 194 additions and 113 deletions
+6 -6
View File
@@ -24,15 +24,15 @@ pub(crate) use rustfs_ecstore::api::disk::{DiskOption as EcstoreDiskOption, new_
pub(crate) use rustfs_ecstore::api::error::{Error as EcstoreErrorType, StorageError as EcstoreStorageError};
pub(crate) use rustfs_ecstore::api::global::GLOBAL_LOCAL_DISK_MAP as ECSTORE_GLOBAL_LOCAL_DISK_MAP;
pub(crate) use rustfs_ecstore::api::storage::ECStore as EcstoreStore;
pub(crate) use rustfs_storage_api::{
BucketInfo, BucketOperations, DiskSetSelector, HealOperations, ListOperations, ObjectIO, ObjectOperations, StorageAdminApi,
};
use rustfs_storage_api as storage_contracts;
pub(crate) mod owner {
pub(crate) use super::storage_contracts::{ObjectIO, ObjectOperations};
pub(crate) use super::{
ECSTORE_BUCKET_META_PREFIX, ECSTORE_DATA_USAGE_CACHE_NAME, ECSTORE_GLOBAL_LOCAL_DISK_MAP, ECSTORE_RUSTFS_META_BUCKET,
EcstoreDeleteOptions, EcstoreDiskAPI, EcstoreDiskBytes, EcstoreDiskError, EcstoreDiskResult, EcstoreDiskStore,
EcstoreEndpoint, EcstoreErrorType, EcstoreStorageError, EcstoreStore, ObjectIO, ObjectOperations,
EcstoreEndpoint, EcstoreErrorType, EcstoreStorageError, EcstoreStore,
};
#[cfg(test)]
@@ -40,7 +40,7 @@ pub(crate) mod owner {
}
pub(crate) mod storage {
pub(crate) use super::{
pub(crate) use super::storage_contracts::{
BucketInfo, BucketOperations, DiskSetSelector, HealOperations, ListOperations, ObjectIO, ObjectOperations,
StorageAdminApi,
};
@@ -48,5 +48,5 @@ pub(crate) mod storage {
#[cfg(test)]
pub(crate) mod status {
pub(crate) use super::BucketInfo;
pub(crate) use super::storage_contracts::BucketInfo;
}
@@ -13,8 +13,9 @@
// limitations under the License.
pub(crate) use rustfs_ecstore::api::disk::{DiskStore, endpoint::Endpoint};
pub(crate) use rustfs_storage_api::BucketInfo;
use rustfs_storage_api as storage_contracts;
pub(crate) mod bug_fixes {
pub(crate) use super::{BucketInfo, DiskStore, Endpoint};
pub(crate) use super::storage_contracts::BucketInfo;
pub(crate) use super::{DiskStore, Endpoint};
}
@@ -16,11 +16,12 @@ pub(crate) use rustfs_ecstore::api::bucket::metadata_sys::init_bucket_metadata_s
pub(crate) use rustfs_ecstore::api::disk::endpoint::Endpoint;
pub(crate) use rustfs_ecstore::api::layout::{EndpointServerPools, Endpoints, PoolEndpoints};
pub(crate) use rustfs_ecstore::api::storage::{ECStore, init_local_disks};
pub(crate) use rustfs_storage_api::{BucketOperations, BucketOptions, ObjectIO, ObjectOperations};
use rustfs_storage_api as storage_contracts;
pub(crate) mod integration {
pub(crate) use super::storage_contracts::{BucketOperations, BucketOptions, ObjectIO, ObjectOperations};
pub(crate) use super::{
BucketOperations, BucketOptions, ECStore, Endpoint, EndpointServerPools, Endpoints, ObjectIO, ObjectOperations,
PoolEndpoints, init_bucket_metadata_sys, init_local_disks,
ECStore, Endpoint, EndpointServerPools, Endpoints, PoolEndpoints, init_bucket_metadata_sys, init_local_disks,
};
}