@@ -1,31 +1,31 @@
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
|
||||
use conduwuit_core::{
|
||||
use tokio::{runtime, sync::Mutex};
|
||||
use tuwunel_core::{
|
||||
Error, Result,
|
||||
config::Config,
|
||||
info,
|
||||
log::Log,
|
||||
utils::{stream, sys},
|
||||
};
|
||||
use tokio::{runtime, sync::Mutex};
|
||||
|
||||
use crate::{clap::Args, logging::TracingFlameGuard};
|
||||
|
||||
/// Server runtime state; complete
|
||||
pub(crate) struct Server {
|
||||
/// Server runtime state; public portion
|
||||
pub(crate) server: Arc<conduwuit_core::Server>,
|
||||
pub(crate) server: Arc<tuwunel_core::Server>,
|
||||
|
||||
pub(crate) services: Mutex<Option<Arc<conduwuit_service::Services>>>,
|
||||
pub(crate) services: Mutex<Option<Arc<tuwunel_service::Services>>>,
|
||||
|
||||
_tracing_flame_guard: TracingFlameGuard,
|
||||
|
||||
#[cfg(feature = "sentry_telemetry")]
|
||||
_sentry_guard: Option<::sentry::ClientInitGuard>,
|
||||
|
||||
#[cfg(all(conduwuit_mods, feature = "conduwuit_mods"))]
|
||||
#[cfg(all(tuwunel_mods, feature = "tuwunel_mods"))]
|
||||
// Module instances; TODO: move to mods::loaded mgmt vector
|
||||
pub(crate) mods: tokio::sync::RwLock<Vec<conduwuit_core::mods::Module>>,
|
||||
pub(crate) mods: tokio::sync::RwLock<Vec<tuwunel_core::mods::Module>>,
|
||||
}
|
||||
|
||||
impl Server {
|
||||
@@ -66,11 +66,11 @@ impl Server {
|
||||
database_path = ?config.database_path,
|
||||
log_levels = %config.log,
|
||||
"{}",
|
||||
conduwuit_core::version(),
|
||||
tuwunel_core::version(),
|
||||
);
|
||||
|
||||
Ok(Arc::new(Self {
|
||||
server: Arc::new(conduwuit_core::Server::new(config, runtime.cloned(), Log {
|
||||
server: Arc::new(tuwunel_core::Server::new(config, runtime.cloned(), Log {
|
||||
reload: tracing_reload_handle,
|
||||
capture,
|
||||
})),
|
||||
@@ -82,7 +82,7 @@ impl Server {
|
||||
#[cfg(feature = "sentry_telemetry")]
|
||||
_sentry_guard: sentry_guard,
|
||||
|
||||
#[cfg(all(conduwuit_mods, feature = "conduwuit_mods"))]
|
||||
#[cfg(all(tuwunel_mods, feature = "tuwunel_mods"))]
|
||||
mods: tokio::sync::RwLock::new(Vec::new()),
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user