mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-09 22:59:59 +00:00
refactor(obs): use lifecycle runtime facades (#4031)
This commit is contained in:
@@ -845,7 +845,7 @@ mod tests {
|
||||
};
|
||||
let endpoint_pools = EndpointServerPools(vec![pool_endpoints]);
|
||||
|
||||
if let Some(store) = crate::storage::storage_api::ecstore_global::new_object_layer_fn() {
|
||||
if let Some(store) = runtime_sources::object_store() {
|
||||
return (temp_dir, store, endpoint_pools);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[cfg(test)]
|
||||
use super::super::storage_api::context::ECStore;
|
||||
use super::super::storage_api::context::EndpointServerPools;
|
||||
use super::super::storage_api::context::bucket::metadata_sys::BucketMetadataSys;
|
||||
use super::super::storage_api::context::runtime::{
|
||||
@@ -178,6 +180,11 @@ pub fn expiry_state() -> Arc<RwLock<ExpiryState>> {
|
||||
get_global_expiry_state()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn object_store() -> Option<Arc<ECStore>> {
|
||||
super::super::storage_api::context::runtime::new_object_layer_fn()
|
||||
}
|
||||
|
||||
pub fn server_config() -> Option<Config> {
|
||||
get_global_server_config()
|
||||
}
|
||||
|
||||
@@ -171,6 +171,11 @@ pub(crate) mod runtime {
|
||||
crate::storage::storage_api::get_global_expiry_state()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn new_object_layer_fn() -> Option<Arc<crate::storage::storage_api::ECStore>> {
|
||||
crate::storage::storage_api::ecstore_global::new_object_layer_fn()
|
||||
}
|
||||
|
||||
pub(crate) fn set_object_store_resolver(resolver: Arc<ObjectStoreResolver>) -> bool {
|
||||
crate::storage::storage_api::set_object_store_resolver(resolver)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user