diff --git a/crates/common/src/manager/reload.rs b/crates/common/src/manager/reload.rs index 1f65ad39..f7532a36 100644 --- a/crates/common/src/manager/reload.rs +++ b/crates/common/src/manager/reload.rs @@ -64,7 +64,7 @@ impl Core { } pub async fn reload_lookups(&self) -> trc::Result { - let mut config = self.storage.config.build_config("certificate").await?; + let mut config = self.storage.config.build_config("lookup").await?; let mut stores = Stores::default(); stores.parse_memory_stores(&mut config); diff --git a/crates/store/src/backend/redis/mod.rs b/crates/store/src/backend/redis/mod.rs index f4c31260..0f06e65b 100644 --- a/crates/store/src/backend/redis/mod.rs +++ b/crates/store/src/backend/redis/mod.rs @@ -19,6 +19,7 @@ use utils::config::{utils::AsKey, Config}; pub mod lookup; pub mod pool; +#[derive(Debug)] pub struct RedisStore { pool: RedisPool, } @@ -186,3 +187,12 @@ fn build_pool( fn into_error(err: impl Display) -> trc::Error { trc::StoreEvent::RedisError.reason(err) } + +impl std::fmt::Debug for RedisPool { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Single(_) => f.debug_tuple("Single").finish(), + Self::Cluster(_) => f.debug_tuple("Cluster").finish(), + } + } +} diff --git a/crates/store/src/lib.rs b/crates/store/src/lib.rs index d102e719..21a03583 100644 --- a/crates/store/src/lib.rs +++ b/crates/store/src/lib.rs @@ -219,7 +219,7 @@ pub enum FtsStore { ElasticSearch(Arc), } -#[derive(Clone)] +#[derive(Clone, Debug)] pub enum LookupStore { Store(Store), Query(Arc), @@ -228,6 +228,7 @@ pub enum LookupStore { Memory(Arc), } +#[derive(Debug)] pub struct QueryStore { pub store: LookupStore, pub query: String,