Registry crate implementation
This commit is contained in:
@@ -10,6 +10,7 @@ nlp = { path = "../nlp" }
|
||||
store = { path = "../store" }
|
||||
trc = { path = "../trc" }
|
||||
directory = { path = "../directory" }
|
||||
coordinator = { path = "../coordinator" }
|
||||
types = { path = "../types" }
|
||||
jmap_proto = { path = "../jmap-proto" }
|
||||
imap_proto = { path = "../imap-proto" }
|
||||
|
||||
@@ -13,6 +13,7 @@ use crate::{
|
||||
listener::tls::AcmeProviders, manager::config::ConfigManager,
|
||||
};
|
||||
use arc_swap::ArcSwap;
|
||||
use coordinator::Coordinator;
|
||||
use directory::{Directories, Directory};
|
||||
use groupware::GroupwareConfig;
|
||||
use hyper::HeaderMap;
|
||||
@@ -132,21 +133,21 @@ impl Core {
|
||||
}
|
||||
})
|
||||
.unwrap_or_default();
|
||||
let pubsub = config
|
||||
.value("cluster.coordinator")
|
||||
.map(|id| id.to_string())
|
||||
.and_then(|id| {
|
||||
if let Some(store) = stores.pubsub_stores.get(&id) {
|
||||
store.clone().into()
|
||||
} else {
|
||||
config.new_parse_error(
|
||||
"cluster.coordinator",
|
||||
format!("Coordinator backend {id:?} not found"),
|
||||
);
|
||||
None
|
||||
}
|
||||
})
|
||||
.unwrap_or_default();
|
||||
let pubsub = Coordinator::None; /*config
|
||||
.value("cluster.coordinator")
|
||||
.map(|id| id.to_string())
|
||||
.and_then(|id| {
|
||||
if let Some(store) = stores.pubsub_stores.get(&id) {
|
||||
store.clone().into()
|
||||
} else {
|
||||
config.new_parse_error(
|
||||
"cluster.coordinator",
|
||||
format!("Coordinator backend {id:?} not found"),
|
||||
);
|
||||
None
|
||||
}
|
||||
})
|
||||
.unwrap_or_default();*/
|
||||
let mut directories =
|
||||
Directories::parse(config, &stores, data.clone(), is_enterprise).await;
|
||||
let directory = config
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use ahash::AHashMap;
|
||||
use coordinator::Coordinator;
|
||||
use directory::Directory;
|
||||
use store::{BlobStore, SearchStore, InMemoryStore, PubSubStore, PurgeSchedule, Store};
|
||||
use std::sync::Arc;
|
||||
use store::{BlobStore, InMemoryStore, PurgeSchedule, SearchStore, Store};
|
||||
|
||||
use crate::manager::config::ConfigManager;
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct Storage {
|
||||
pub blob: BlobStore,
|
||||
pub fts: SearchStore,
|
||||
pub lookup: InMemoryStore,
|
||||
pub pubsub: PubSubStore,
|
||||
pub pubsub: Coordinator,
|
||||
pub directory: Arc<Directory>,
|
||||
pub directories: AHashMap<String, Arc<Directory>>,
|
||||
pub purge_schedules: Vec<PurgeSchedule>,
|
||||
|
||||
@@ -76,7 +76,6 @@ impl Server {
|
||||
blob_stores: self.core.storage.blobs.clone(),
|
||||
search_stores: self.core.storage.ftss.clone(),
|
||||
in_memory_stores: self.core.storage.lookups.clone(),
|
||||
pubsub_stores: Default::default(),
|
||||
purge_schedules: Default::default(),
|
||||
};
|
||||
stores.parse_stores(&mut config).await;
|
||||
|
||||
Reference in New Issue
Block a user