mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 02:56:18 +00:00
refactor: prune consumer storage compat paths (#3704)
This commit is contained in:
@@ -13,9 +13,13 @@
|
||||
// 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 std::sync::Arc;
|
||||
|
||||
type NotifyStore = rustfs_ecstore::api::storage::ECStore;
|
||||
type NotifyStore = ecstore_storage::ECStore;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum NotifyConfigStoreError {
|
||||
@@ -44,17 +48,17 @@ where
|
||||
}
|
||||
|
||||
fn resolve_notify_object_store_handle() -> Option<Arc<NotifyStore>> {
|
||||
rustfs_ecstore::api::global::resolve_object_store_handle()
|
||||
ecstore_resolve_object_store_handle()
|
||||
}
|
||||
|
||||
async fn read_notify_server_config_without_migrate(store: Arc<NotifyStore>) -> Result<Config, NotifyConfigStoreError> {
|
||||
rustfs_ecstore::api::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> {
|
||||
rustfs_ecstore::api::config::com::save_server_config(store, config)
|
||||
ecstore_config_com::save_server_config(store, config)
|
||||
.await
|
||||
.map_err(|err| NotifyConfigStoreError::Save(err.to_string()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user