refactor: wrap the encryption and file storage interface client in appstate with Arc as opposed to Box (#4949)

This commit is contained in:
Chethan Rao
2024-06-11 20:23:05 +05:30
committed by GitHub
parent 42cd769407
commit 88cf904f5b
4 changed files with 16 additions and 11 deletions

View File

@ -82,7 +82,7 @@ pub struct SessionState {
pub email_client: Arc<dyn EmailService>,
#[cfg(feature = "olap")]
pub pool: AnalyticsProvider,
pub file_storage_client: Box<dyn FileStorageInterface>,
pub file_storage_client: Arc<dyn FileStorageInterface>,
pub request_id: Option<RequestId>,
pub base_url: String,
pub tenant: String,
@ -144,8 +144,8 @@ pub struct AppState {
#[cfg(feature = "olap")]
pub opensearch_client: Arc<OpenSearchClient>,
pub request_id: Option<RequestId>,
pub file_storage_client: Box<dyn FileStorageInterface>,
pub encryption_client: Box<dyn EncryptionManagementInterface>,
pub file_storage_client: Arc<dyn FileStorageInterface>,
pub encryption_client: Arc<dyn EncryptionManagementInterface>,
}
impl scheduler::SchedulerAppState for AppState {
fn get_tenants(&self) -> Vec<String> {