remove unneeded pub

This commit is contained in:
Luna Yao
2026-04-06 02:26:07 +02:00
parent b7edbad4b9
commit 2b3417d703
5 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ mod peer_mgr;
pub mod server; pub mod server;
mod system; mod system;
mod utils; mod utils;
pub mod zone; mod zone;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;
+5 -5
View File
@@ -16,7 +16,7 @@ use tracing::instrument;
use uuid::Uuid; use uuid::Uuid;
#[derive(Debug, Clone, Default)] #[derive(Debug, Clone, Default)]
pub struct DnsNodeInfo { struct DnsNodeInfo {
digest: Vec<u8>, digest: Vec<u8>,
zones: ZoneGroup, zones: ZoneGroup,
addresses: HashSet<NameServerAddr>, addresses: HashSet<NameServerAddr>,
@@ -40,15 +40,15 @@ const DNS_CLIENT_TTL: Duration = Duration::from_secs(5);
#[derive(Debug, Default)] #[derive(Debug, Default)]
pub struct DnsNodeMgrDirtyFlags { pub struct DnsNodeMgrDirtyFlags {
pub(super) catalog: DirtyFlag, pub catalog: DirtyFlag,
pub(super) addresses: DirtyFlag, pub addresses: DirtyFlag,
pub(super) listeners: DirtyFlag, pub listeners: DirtyFlag,
} }
#[derive(Debug)] #[derive(Debug)]
pub struct DnsNodeMgr { pub struct DnsNodeMgr {
nodes: Cache<Uuid, DnsNodeInfo>, nodes: Cache<Uuid, DnsNodeInfo>,
pub(super) dirty: DnsNodeMgrDirtyFlags, pub dirty: DnsNodeMgrDirtyFlags,
} }
impl DnsNodeMgr { impl DnsNodeMgr {
+1 -1
View File
@@ -22,7 +22,7 @@ use std::time::Duration;
use tracing::instrument; use tracing::instrument;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct DnsPeerInfo { struct DnsPeerInfo {
digest: Vec<u8>, digest: Vec<u8>,
zones: Vec<ZoneData>, zones: Vec<ZoneData>,
} }
+3 -3
View File
@@ -37,18 +37,18 @@ use tracing::{instrument, Instrument};
use crate::instance::instance::{ArcNicCtx, NicCtx}; use crate::instance::instance::{ArcNicCtx, NicCtx};
#[derive(Clone)] #[derive(Clone)]
pub struct DynamicCatalog { struct DynamicCatalog {
inner: Arc<tokio::sync::RwLock<Catalog>>, inner: Arc<tokio::sync::RwLock<Catalog>>,
} }
impl DynamicCatalog { impl DynamicCatalog {
pub fn new() -> Self { fn new() -> Self {
Self { Self {
inner: Arc::new(tokio::sync::RwLock::new(Catalog::new())), inner: Arc::new(tokio::sync::RwLock::new(Catalog::new())),
} }
} }
pub async fn replace(&self, new: Catalog) { async fn replace(&self, new: Catalog) {
*self.inner.write().await = new; *self.inner.write().await = new;
} }
} }
+4 -4
View File
@@ -22,11 +22,11 @@ use uuid::Uuid;
#[derive(Derivative, Debug, Clone)] #[derive(Derivative, Debug, Clone)]
#[derivative(PartialEq)] #[derivative(PartialEq)]
pub struct Zone { pub struct Zone {
pub(crate) id: Uuid, id: Uuid,
pub(crate) origin: LowerName, origin: LowerName,
pub(crate) records: BTreeMap<RrKey, RecordSet>, records: BTreeMap<RrKey, RecordSet>,
#[derivative(PartialEq(compare_with = "Zone::compare_forward"))] #[derivative(PartialEq(compare_with = "Zone::compare_forward"))]
pub(crate) forward: Option<ForwardConfig>, pub forward: Option<ForwardConfig>,
} }
impl Zone { impl Zone {