mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-02 01:03:54 +00:00
remove unneeded pub
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user