refactor(ecstore): wrap background cancel token access (#4078)

This commit is contained in:
Zhengchao An
2026-06-30 02:09:39 +08:00
committed by GitHub
parent d3a84395dc
commit 35d7d6bf23
5 changed files with 32 additions and 8 deletions
@@ -16,6 +16,7 @@ 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;
@@ -34,6 +35,10 @@ pub(crate) fn tier_config_mgr_handle() -> Arc<RwLock<TierConfigMgr>> {
sources::tier_config_mgr_handle()
}
pub(crate) fn background_services_cancel_token() -> Option<&'static CancellationToken> {
sources::background_services_cancel_token()
}
pub(crate) fn object_store_handle() -> Option<Arc<ECStore>> {
sources::object_store_handle()
}