// Copyright 2024 RustFS Team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::sync::Arc; use s3s::dto::BucketLifecycleConfiguration; use tokio::sync::RwLock; use tokio_util::sync::CancellationToken; use crate::bucket::lifecycle::bucket_lifecycle_ops::{ExpiryState, TransitionState}; use crate::runtime::sources; use crate::services::tier::tier::TierConfigMgr; use crate::store::ECStore; pub(crate) fn expiry_state_handle() -> Arc> { sources::expiry_state_handle() } pub(crate) fn transition_state_handle() -> Arc { sources::transition_state_handle() } pub(crate) fn tier_config_mgr_handle() -> Arc> { sources::tier_config_mgr_handle() } pub(crate) fn background_services_cancel_token() -> Option { sources::background_services_cancel_token() } pub(crate) fn object_store_handle() -> Option> { sources::object_store_handle() } pub(crate) fn default_local_node_name() -> String { sources::default_local_node_name() } pub(crate) fn deployment_id() -> Option { sources::deployment_id() } pub(crate) async fn bucket_lifecycle_config(bucket: &str) -> Option { sources::bucket_lifecycle_config(bucket).await }