Skip to main content

kmp_application/queries/
query_application_service.rs

1use std::sync::Arc;
2
3#[derive(Debug)]
4pub struct QueryApplicationService<G, D, S> {
5    pub(crate) graph_reader: Arc<G>,
6    pub(crate) detail_reader: Arc<D>,
7    pub(crate) snapshot_store: Arc<S>,
8    pub(crate) generator_version: &'static str,
9}
10
11impl<G, D, S> QueryApplicationService<G, D, S> {
12    pub fn new(
13        graph_reader: Arc<G>,
14        detail_reader: Arc<D>,
15        snapshot_store: Arc<S>,
16        generator_version: &'static str,
17    ) -> Self {
18        Self {
19            graph_reader,
20            detail_reader,
21            snapshot_store,
22            generator_version,
23        }
24    }
25}