Unfinished (broken) commit

pull/195/head
Chip Senkbeil 1 year ago
parent 718095e99a
commit 8ae6506615
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

@ -5,6 +5,7 @@ use distant_core::net::auth::Verifier;
use distant_core::net::common::{Host, SecretKey32};
use distant_core::net::server::{Server, ServerConfig as NetServerConfig, ServerRef};
use distant_core::DistantSingleKeyCredentials;
use distant_local::{Config as LocalConfig, WatchConfig as LocalWatchConfig};
use log::*;
use crate::options::ServerSubcommand;
@ -140,7 +141,11 @@ async fn async_run(cmd: ServerSubcommand, _is_forked: bool) -> CliResult {
"using an ephemeral port".to_string()
}
);
let handler = distant_local::new_handler(Default::default())
let handler = distant_local::new_handler(LocalConfig {
watch: LocalWatchConfig {
native:
}
})
.context("Failed to create local distant api")?;
let server = Server::tcp()
.config(NetServerConfig {

@ -3,7 +3,10 @@ use serde::{Deserialize, Serialize};
use super::common::LoggingSettings;
mod listen;
mod watch;
pub use listen::*;
pub use watch::*;
/// Represents configuration settings for the distant server
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
@ -12,4 +15,5 @@ pub struct ServerConfig {
pub logging: LoggingSettings,
pub listen: ServerListenConfig,
pub watch: ServerWatchConfig,
}

@ -0,0 +1,24 @@
use std::time::Duration;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ServerWatchConfig {
pub native: bool,
pub poll_interval: Option<Duration>,
pub compare_contents: bool,
pub debounce_timeout: Duration,
pub debounce_tick_rate: Option<Duration>,
}
impl Default for ServerWatchConfig {
fn default() -> Self {
Self {
native: true,
poll_interval: None,
compare_contents: false,
debounce_timeout: Duration::from_millis(500),
debounce_tick_rate: None,
}
}
}
Loading…
Cancel
Save