use serde::Deserialize;
use std::path::PathBuf;
use std::time::Duration;
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct InstallConfig {
pub product_name: String,
pub product_version: String,
pub port: u16,
pub management_port: Option<u16>,
pub keystore: Option<super::KeystoreConfig>,
pub client_auth_truststore: Option<super::ClientAuthTruststoreConfig>,
pub context_path: Option<String>,
pub use_console_log: Option<bool>,
pub server: Option<super::ServerConfig>,
pub minidump: Option<super::MinidumpConfig>,
}
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct KeystoreConfig {
pub key_path: Option<PathBuf>,
pub cert_path: Option<PathBuf>,
}
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct ClientAuthTruststoreConfig {
pub path: Option<PathBuf>,
}
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct ServerConfig {
pub processors: Option<usize>,
pub min_threads: Option<usize>,
pub max_threads: Option<usize>,
pub max_connections: Option<usize>,
pub io_threads: Option<usize>,
#[serde(default, with = "humantime_serde")]
pub idle_thread_timeout: Option<Duration>,
pub shutdown_timeout: Option<Duration>,
pub gzip: Option<bool>,
pub http2: Option<bool>,
#[serde(default, with = "humantime_serde")]
pub idle_connection_timeout: Option<Duration>,
}
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct MinidumpConfig {
pub enabled: Option<bool>,
pub socket_dir: Option<PathBuf>,
}