feat: add presentation layer + bootstrap wiring for vertical slice
This commit is contained in:
12
crates/bootstrap/src/log_event_publisher.rs
Normal file
12
crates/bootstrap/src/log_event_publisher.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use async_trait::async_trait;
|
||||
use domain::{errors::DomainError, events::DomainEvent, ports::EventPublisher};
|
||||
|
||||
pub struct LogEventPublisher;
|
||||
|
||||
#[async_trait]
|
||||
impl EventPublisher for LogEventPublisher {
|
||||
async fn publish(&self, event: DomainEvent) -> Result<(), DomainError> {
|
||||
tracing::info!(?event, "domain event published");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user