Bootstrap from registry - part 7
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user