refactor: split compat facade imports (#3716)

This commit is contained in:
安正超
2026-06-22 09:53:22 +08:00
committed by GitHub
parent 89552e1df0
commit de158743c3
23 changed files with 182 additions and 84 deletions
+6 -7
View File
@@ -13,10 +13,9 @@
// limitations under the License.
use rustfs_config::server_config::Config;
use rustfs_ecstore::api::{
config::com as ecstore_config_com, global::resolve_object_store_handle as ecstore_resolve_object_store_handle,
storage as ecstore_storage,
};
use rustfs_ecstore::api::config as ecstore_config;
use rustfs_ecstore::api::global as ecstore_global;
use rustfs_ecstore::api::storage as ecstore_storage;
use std::sync::Arc;
type NotifyStore = ecstore_storage::ECStore;
@@ -48,17 +47,17 @@ where
}
fn resolve_notify_object_store_handle() -> Option<Arc<NotifyStore>> {
ecstore_resolve_object_store_handle()
ecstore_global::resolve_object_store_handle()
}
async fn read_notify_server_config_without_migrate(store: Arc<NotifyStore>) -> Result<Config, NotifyConfigStoreError> {
ecstore_config_com::read_config_without_migrate(store)
ecstore_config::com::read_config_without_migrate(store)
.await
.map_err(|err| NotifyConfigStoreError::Read(err.to_string()))
}
async fn save_notify_server_config(store: Arc<NotifyStore>, config: &Config) -> Result<(), NotifyConfigStoreError> {
ecstore_config_com::save_server_config(store, config)
ecstore_config::com::save_server_config(store, config)
.await
.map_err(|err| NotifyConfigStoreError::Save(err.to_string()))
}