Bootstrap from registry - part 7

This commit is contained in:
mdecimus
2026-02-03 12:23:05 +01:00
parent 262aed19af
commit 7c8be27fcf
93 changed files with 1206 additions and 9398 deletions

View File

@@ -11,7 +11,7 @@ use registry::schema::{prelude::Object, structs};
impl BlobStore {
pub async fn build(bp: &mut Bootstrap) -> Option<Self> {
let result = match bp.setting_infallible::<structs::BlobStore>().await {
structs::BlobStore::Default => return None,
structs::BlobStore::Default => return Some(BlobStore::Store(bp.data_store.clone())),
#[cfg(feature = "foundation")]
structs::BlobStore::FoundationDb(foundation_db_store) => {
crate::backend::foundationdb::FdbStore::open(foundation_db_store)

View File

@@ -11,7 +11,9 @@ use registry::schema::{prelude::Object, structs};
impl InMemoryStore {
pub async fn build(bp: &mut Bootstrap) -> Option<Self> {
let result = match bp.setting_infallible::<structs::InMemoryStore>().await {
structs::InMemoryStore::Default => return None,
structs::InMemoryStore::Default => {
return Some(InMemoryStore::Store(bp.data_store.clone()));
}
#[cfg(feature = "redis")]
structs::InMemoryStore::Redis(redis_store) => {
crate::backend::redis::RedisStore::open_single(redis_store).await

View File

@@ -15,7 +15,9 @@ use registry::schema::{prelude::Object, structs};
impl SearchStore {
pub async fn build(bp: &mut Bootstrap) -> Option<Self> {
let result = match bp.setting_infallible::<structs::SearchStore>().await {
structs::SearchStore::Default => return None,
structs::SearchStore::Default => {
return Some(SearchStore::Store(bp.data_store.clone()));
}
structs::SearchStore::ElasticSearch(elastic_search_store) => {
ElasticSearchStore::open(elastic_search_store).await
}