feat(worker): add FederationManagementHandler and wire into event loop

This commit is contained in:
2026-05-28 02:30:22 +02:00
parent e5c8380ba7
commit 925f4f8bf3
3 changed files with 30 additions and 4 deletions

View File

@@ -1,4 +1,6 @@
use application::services::{FederationEventService, NotificationEventService};
use application::services::{
FederationEventService, FederationManagementEventService, NotificationEventService,
};
use domain::{errors::DomainError, events::DomainEvent};
use std::sync::Arc;
@@ -21,3 +23,13 @@ impl FederationHandler {
self.service.process(event).await
}
}
pub struct FederationManagementHandler {
pub service: Arc<FederationManagementEventService>,
}
impl FederationManagementHandler {
pub async fn handle(&self, event: &DomainEvent) -> Result<(), DomainError> {
self.service.process(event).await
}
}