mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-07 13:09:46 +00:00
remove unneeded pub
This commit is contained in:
@@ -5,7 +5,7 @@ mod peer_mgr;
|
||||
pub mod server;
|
||||
mod system;
|
||||
mod utils;
|
||||
pub mod zone;
|
||||
mod zone;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>,
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user