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;
mod system;
mod utils;
pub mod zone;
mod zone;
#[cfg(test)]
mod tests;
+5 -5
View File
@@ -16,7 +16,7 @@ use tracing::instrument;
use uuid::Uuid;
#[derive(Debug, Clone, Default)]
pub struct DnsNodeInfo {
struct DnsNodeInfo {
digest: Vec<u8>,
zones: ZoneGroup,
addresses: HashSet<NameServerAddr>,
@@ -40,15 +40,15 @@ const DNS_CLIENT_TTL: Duration = Duration::from_secs(5);
#[derive(Debug, Default)]
pub struct DnsNodeMgrDirtyFlags {
pub(super) catalog: DirtyFlag,
pub(super) addresses: DirtyFlag,
pub(super) listeners: DirtyFlag,
pub catalog: DirtyFlag,
pub addresses: DirtyFlag,
pub listeners: DirtyFlag,
}
#[derive(Debug)]
pub struct DnsNodeMgr {
nodes: Cache<Uuid, DnsNodeInfo>,
pub(super) dirty: DnsNodeMgrDirtyFlags,
pub dirty: DnsNodeMgrDirtyFlags,
}
impl DnsNodeMgr {
+1 -1
View File
@@ -22,7 +22,7 @@ use std::time::Duration;
use tracing::instrument;
#[derive(Debug, Clone)]
pub struct DnsPeerInfo {
struct DnsPeerInfo {
digest: Vec<u8>,
zones: Vec<ZoneData>,
}
+3 -3
View File
@@ -37,18 +37,18 @@ use tracing::{instrument, Instrument};
use crate::instance::instance::{ArcNicCtx, NicCtx};
#[derive(Clone)]
pub struct DynamicCatalog {
struct DynamicCatalog {
inner: Arc<tokio::sync::RwLock<Catalog>>,
}
impl DynamicCatalog {
pub fn new() -> Self {
fn new() -> Self {
Self {
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;
}
}
+4 -4
View File
@@ -22,11 +22,11 @@ use uuid::Uuid;
#[derive(Derivative, Debug, Clone)]
#[derivative(PartialEq)]
pub struct Zone {
pub(crate) id: Uuid,
pub(crate) origin: LowerName,
pub(crate) records: BTreeMap<RrKey, RecordSet>,
id: Uuid,
origin: LowerName,
records: BTreeMap<RrKey, RecordSet>,
#[derivative(PartialEq(compare_with = "Zone::compare_forward"))]
pub(crate) forward: Option<ForwardConfig>,
pub forward: Option<ForwardConfig>,
}
impl Zone {