iroh_dns_server/
state.rs

1//! Shared state and store for the iroh-dns-server
2
3use std::sync::Arc;
4
5use crate::{dns::DnsHandler, metrics::Metrics, store::ZoneStore};
6
7/// The shared app state.
8#[derive(Clone)]
9pub(crate) struct AppState {
10    /// The pkarr DNS store
11    pub store: ZoneStore,
12    /// Handler for DNS requests
13    pub dns_handler: DnsHandler,
14    /// Metrics collector.
15    pub metrics: Arc<Metrics>,
16}