refactor: adapters configured from config crate

This commit is contained in:
2026-10-25 21:07:19 +01:00
parent 1f724bb064
commit 04f9c13625
45 changed files with 277 additions and 177 deletions

View File

@@ -4,6 +4,7 @@ version = "0.1.0"
edition.workspace = true
[dependencies]
config = { workspace = true }
domain = { workspace = true }
async-trait = { workspace = true }
tokio = { workspace = true }

View File

@@ -16,12 +16,10 @@ pub struct EventPublisherConfig {
}
impl EventPublisherConfig {
pub fn from_env() -> Self {
let channel_buffer = std::env::var("EVENT_CHANNEL_BUFFER")
.ok()
.and_then(|v| v.parse().ok())
.unwrap_or(128);
Self { channel_buffer }
pub fn from_config(config: &config::EventsConfig) -> Self {
Self {
channel_buffer: config.channel_buffer,
}
}
}