move dirty to crate::utils

This commit is contained in:
Luna Yao
2026-04-17 23:31:51 +02:00
parent 7345acfe7c
commit 84984e1641
6 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -134,12 +134,12 @@ pub trait ConfigLoader: Send + Sync + DnsConfigLoaderExt {
fn get_id(&self) -> uuid::Uuid;
fn set_id(&self, id: uuid::Uuid);
fn get_inst_name(&self) -> String;
fn set_inst_name(&self, name: String);
fn get_hostname(&self) -> String;
fn set_hostname(&self, name: Option<String>);
fn get_inst_name(&self) -> String;
fn set_inst_name(&self, name: String);
fn get_netns(&self) -> Option<String>;
fn set_netns(&self, ns: Option<String>);
+1 -1
View File
@@ -1,6 +1,6 @@
use crate::dns::config::DNS_NODE_TTI;
use crate::dns::utils::addr::NameServerAddr;
use crate::dns::utils::dirty::DirtyFlag;
use crate::utils::dirty::DirtyFlag;
use crate::dns::zone::{Zone, ZoneGroup};
use crate::proto::dns::DnsNodeMgrRpc;
use crate::proto::dns::{DnsSnapshot, HeartbeatRequest, HeartbeatResponse};
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::common::PeerId;
use crate::common::global_ctx::ArcGlobalCtx;
use crate::dns::config::{DNS_PEER_TTI, DnsExportConfig, DnsGlobalCtxExt};
use crate::dns::utils::dirty::DirtyFlag;
use crate::utils::dirty::DirtyFlag;
use crate::dns::zone::ZoneGroup;
use crate::peer_center::instance::PeerCenterPeerManagerTrait;
use crate::peers::peer_manager::PeerManager;
+1 -2
View File
@@ -2,7 +2,6 @@ use hickory_proto::rr::LowerName;
use idna::AsciiDenyList;
pub mod addr;
pub mod dirty;
pub mod response;
pub mod zone_handler;
@@ -37,7 +36,7 @@ pub fn parse(name: &str) -> LowerName {
name
} else {
let sanitized = sanitize(name);
tracing::debug!("invalid hostname: {}, sanitized to: {}", name, sanitized);
tracing::debug!("invalid name: {}, sanitized to: {}", name, sanitized);
sanitized.parse().unwrap_or_default()
}
}
+1
View File
@@ -1,6 +1,7 @@
pub mod panic;
pub mod string;
pub mod task;
pub mod dirty;
use std::net::{IpAddr, Ipv4Addr, SocketAddr, TcpListener};
use std::sync::{Arc, Weak};