refactor: prune outer compat signature aliases (#3701)

This commit is contained in:
安正超
2026-06-22 00:15:34 +08:00
committed by GitHub
parent ef111a3e40
commit eb33e9f2ea
6 changed files with 65 additions and 18 deletions
+4 -2
View File
@@ -24,6 +24,7 @@ pub(crate) type DiskStat = rustfs_ecstore::api::rebalance::DiskStat;
pub(crate) type ECStore = rustfs_ecstore::api::storage::ECStore;
pub(crate) type EndpointServerPools = rustfs_ecstore::api::layout::EndpointServerPools;
pub(crate) type MetricType = rustfs_ecstore::api::metrics::MetricType;
pub(crate) type NotificationSys = rustfs_ecstore::api::notification::NotificationSys;
pub(crate) type PeerRestClient = rustfs_ecstore::api::rpc::PeerRestClient;
pub(crate) type RebalSaveOpt = rustfs_ecstore::api::rebalance::RebalSaveOpt;
pub(crate) type RebalanceCleanupWarnings = rustfs_ecstore::api::rebalance::RebalanceCleanupWarnings;
@@ -50,6 +51,7 @@ pub(crate) type RebalanceInfo = rustfs_ecstore::api::rebalance::RebalanceInfo;
pub(crate) mod bandwidth {
pub(crate) mod monitor {
pub(crate) type BandwidthDetails = rustfs_ecstore::api::bucket::bandwidth::monitor::BandwidthDetails;
pub(crate) type Monitor = rustfs_ecstore::api::bucket::bandwidth::monitor::Monitor;
}
}
@@ -309,7 +311,7 @@ pub(crate) async fn load_data_usage_from_backend(
rustfs_ecstore::api::data_usage::load_data_usage_from_backend(store).await
}
pub(crate) fn get_global_bucket_monitor() -> Option<Arc<rustfs_ecstore::api::bucket::bandwidth::monitor::Monitor>> {
pub(crate) fn get_global_bucket_monitor() -> Option<Arc<bandwidth::monitor::Monitor>> {
rustfs_ecstore::api::global::get_global_bucket_monitor()
}
@@ -336,7 +338,7 @@ pub(crate) async fn collect_local_metrics(
rustfs_ecstore::api::metrics::collect_local_metrics(types, opts).await
}
pub(crate) fn get_global_notification_sys() -> Option<&'static rustfs_ecstore::api::notification::NotificationSys> {
pub(crate) fn get_global_notification_sys() -> Option<&'static NotificationSys> {
rustfs_ecstore::api::notification::get_global_notification_sys()
}
+3 -2
View File
@@ -21,6 +21,7 @@ pub(crate) type DynReader = rustfs_ecstore::api::rio::DynReader;
pub(crate) type ECStore = rustfs_ecstore::api::storage::ECStore;
pub(crate) type EndpointServerPools = rustfs_ecstore::api::layout::EndpointServerPools;
pub(crate) type HashReader = rustfs_ecstore::api::rio::HashReader;
pub(crate) type NotificationSys = rustfs_ecstore::api::notification::NotificationSys;
pub(crate) type ObjectStoreResolver = dyn Fn() -> Option<Arc<ECStore>> + Send + Sync + 'static;
pub(crate) type ObjectInfo = <ECStore as rustfs_storage_api::ObjectOperations>::ObjectInfo;
pub(crate) type ObjectOptions = <ECStore as rustfs_storage_api::ObjectOperations>::ObjectOptions;
@@ -162,7 +163,7 @@ pub(crate) mod lifecycle {
pub(crate) async fn persist_tier_delete_journal_entry(
api: Arc<ECStore>,
je: &rustfs_ecstore::api::bucket::lifecycle::tier_sweeper::Jentry,
je: &super::tier_sweeper::Jentry,
) -> std::io::Result<()> {
rustfs_ecstore::api::bucket::lifecycle::tier_delete_journal::persist_tier_delete_journal_entry(api, je).await
}
@@ -515,7 +516,7 @@ pub(crate) fn set_object_store_resolver(resolver: Arc<ObjectStoreResolver>) -> b
rustfs_ecstore::api::global::set_object_store_resolver(resolver)
}
pub(crate) fn get_global_notification_sys() -> Option<&'static rustfs_ecstore::api::notification::NotificationSys> {
pub(crate) fn get_global_notification_sys() -> Option<&'static NotificationSys> {
rustfs_ecstore::api::notification::get_global_notification_sys()
}
+5 -3
View File
@@ -29,6 +29,8 @@ pub(crate) const SERVICE_SIGNAL_RELOAD_DYNAMIC: u64 = rustfs_ecstore::api::rpc::
pub(crate) const STORAGE_CLASS_SUB_SYS: &str = rustfs_ecstore::api::config::com::STORAGE_CLASS_SUB_SYS;
pub(crate) type BucketMetadata = rustfs_ecstore::api::bucket::metadata::BucketMetadata;
#[cfg(test)]
pub(crate) type BucketMetadataSys = rustfs_ecstore::api::bucket::metadata_sys::BucketMetadataSys;
pub(crate) type BucketVersioningSys = rustfs_ecstore::api::bucket::versioning_sys::BucketVersioningSys;
pub(crate) type CollectMetricsOpts = rustfs_ecstore::api::metrics::CollectMetricsOpts;
pub(crate) type DeleteOptions = rustfs_ecstore::api::disk::DeleteOptions;
@@ -39,6 +41,7 @@ pub(crate) type ECStore = rustfs_ecstore::api::storage::ECStore;
pub(crate) type FileInfoVersions = rustfs_ecstore::api::disk::FileInfoVersions;
pub(crate) type LocalPeerS3Client = rustfs_ecstore::api::rpc::LocalPeerS3Client;
pub(crate) type MetricType = rustfs_ecstore::api::metrics::MetricType;
pub(crate) type ObjectLockBlockReason = rustfs_ecstore::api::bucket::object_lock::objectlock_sys::ObjectLockBlockReason;
pub(crate) type PolicySys = rustfs_ecstore::api::bucket::policy_sys::PolicySys;
pub(crate) type ReadMultipleReq = rustfs_ecstore::api::disk::ReadMultipleReq;
pub(crate) type ReadMultipleResp = rustfs_ecstore::api::disk::ReadMultipleResp;
@@ -66,8 +69,7 @@ pub(crate) fn bucket_metadata_sys_initialized() -> bool {
}
#[cfg(test)]
pub(crate) fn get_global_bucket_metadata_sys()
-> Option<Arc<tokio::sync::RwLock<rustfs_ecstore::api::bucket::metadata_sys::BucketMetadataSys>>> {
pub(crate) fn get_global_bucket_metadata_sys() -> Option<Arc<tokio::sync::RwLock<BucketMetadataSys>>> {
rustfs_ecstore::api::bucket::metadata_sys::get_global_bucket_metadata_sys()
}
@@ -152,7 +154,7 @@ pub(crate) fn check_retention_for_modification(
new_mode: Option<&str>,
new_retain_until: Option<time::OffsetDateTime>,
bypass_governance: bool,
) -> Option<rustfs_ecstore::api::bucket::object_lock::objectlock_sys::ObjectLockBlockReason> {
) -> Option<ObjectLockBlockReason> {
rustfs_ecstore::api::bucket::object_lock::objectlock_sys::check_retention_for_modification(
user_defined,
new_mode,