mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-01 00:39:24 +00:00
server: use ArcGlobalCtx
This commit is contained in:
@@ -19,17 +19,15 @@ use tokio::{
|
|||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use super::{utils::NameServerAddr, zone::Zone};
|
use super::{utils::NameServerAddr, zone::Zone};
|
||||||
|
use crate::common::global_ctx::ArcGlobalCtx;
|
||||||
use crate::dns::zone::ZoneGroup;
|
use crate::dns::zone::ZoneGroup;
|
||||||
use crate::proto::dns::DnsSnapshot;
|
use crate::proto::dns::DnsSnapshot;
|
||||||
use crate::proto::rpc_types;
|
use crate::proto::rpc_types;
|
||||||
use crate::utils::{DeterministicDigest, MapTryInto};
|
use crate::proto::{
|
||||||
use crate::{
|
dns::{DnsServerRpc, HeartbeatRequest, HeartbeatResponse},
|
||||||
common::global_ctx::GlobalCtx,
|
rpc_types::controller::BaseController,
|
||||||
proto::{
|
|
||||||
dns::{DnsServerRpc, HeartbeatRequest, HeartbeatResponse},
|
|
||||||
rpc_types::controller::BaseController,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
use crate::utils::{DeterministicDigest, MapTryInto};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct DnsClientInfo {
|
pub struct DnsClientInfo {
|
||||||
@@ -94,7 +92,7 @@ pub struct DnsServerDirtyState {
|
|||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct DnsServer {
|
pub struct DnsServer {
|
||||||
global_ctx: Arc<GlobalCtx>,
|
global_ctx: ArcGlobalCtx,
|
||||||
clients: Cache<Uuid, DnsClientInfo>,
|
clients: Cache<Uuid, DnsClientInfo>,
|
||||||
catalog: DynamicCatalog,
|
catalog: DynamicCatalog,
|
||||||
server: Arc<Mutex<Option<JoinHandle<()>>>>,
|
server: Arc<Mutex<Option<JoinHandle<()>>>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user