move ecsotre/error to common

This commit is contained in:
weisd
2025-03-25 17:14:40 +08:00
parent c3b47adf39
commit 545ae79e44
81 changed files with 444 additions and 359 deletions
@@ -1,10 +1,10 @@
use super::error::{is_err_config_not_found, ConfigError};
use super::{storageclass, Config, GLOBAL_StorageClass, KVS};
use crate::disk::RUSTFS_META_BUCKET;
use crate::error::{Error, Result};
use crate::store_api::{ObjectInfo, ObjectOptions, PutObjReader, StorageAPI};
use crate::store_err::is_err_object_not_found;
use crate::utils::path::SLASH_SEPARATOR;
use common::error::{Error, Result};
use http::HeaderMap;
use lazy_static::lazy_static;
use std::collections::HashSet;
+2 -1
View File
@@ -1,4 +1,5 @@
use crate::{disk, error::Error, store_err::is_err_object_not_found};
use crate::{disk, store_err::is_err_object_not_found};
use common::error::Error;
#[derive(Debug, PartialEq, thiserror::Error)]
pub enum ConfigError {
+2 -4
View File
@@ -1,9 +1,7 @@
use std::time::Duration;
use crate::{
error::{Error, Result},
utils::bool_flag::parse_bool,
};
use crate::utils::bool_flag::parse_bool;
use common::error::{Error, Result};
#[derive(Debug, Default)]
pub struct Config {
+3 -3
View File
@@ -1,12 +1,12 @@
pub mod common;
pub mod com;
pub mod error;
#[allow(dead_code)]
pub mod heal;
pub mod storageclass;
use crate::error::Result;
use crate::store::ECStore;
use common::{lookup_configs, read_config_without_migrate, STORAGE_CLASS_SUB_SYS};
use com::{lookup_configs, read_config_without_migrate, STORAGE_CLASS_SUB_SYS};
use common::error::Result;
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
+2 -4
View File
@@ -1,9 +1,7 @@
use std::env;
use crate::{
config::KV,
error::{Error, Result},
};
use crate::config::KV;
use common::error::{Error, Result};
use super::KVS;
use lazy_static::lazy_static;