Files
thoughts/crates/worker/src/handlers.rs
Gabriel Kaszewski 9aee4ceb6d
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready (#1)
2026-05-16 09:42:40 +00:00

24 lines
635 B
Rust

use application::services::{FederationEventService, NotificationEventService};
use domain::{errors::DomainError, events::DomainEvent};
use std::sync::Arc;
pub struct NotificationHandler {
pub service: Arc<NotificationEventService>,
}
impl NotificationHandler {
pub async fn handle(&self, event: &DomainEvent) -> Result<(), DomainError> {
self.service.process(event).await
}
}
pub struct FederationHandler {
pub service: Arc<FederationEventService>,
}
impl FederationHandler {
pub async fn handle(&self, event: &DomainEvent) -> Result<(), DomainError> {
self.service.process(event).await
}
}