use crate::projection::ProjectionRepository;
use std::sync::Arc;
use tokio::sync::RwLock;
#[derive(Clone, Debug)]
pub struct ProjectionUpdaterEventHandler {
pub repository: Arc<RwLock<dyn ProjectionRepository>>,
}
impl ProjectionUpdaterEventHandler {
pub fn new(repository: Arc<RwLock<dyn ProjectionRepository>>) -> Self {
Self { repository }
}
}
pub struct ProjectionUpdaterEventHandlerFactory;
impl ProjectionUpdaterEventHandlerFactory {
pub fn new() -> Self {
Self
}
}
impl Default for ProjectionUpdaterEventHandlerFactory {
fn default() -> Self {
Self::new()
}
}