feat(protocol): ServerConfig + ConfigError + RpcErrorCode

This commit is contained in:
2026-05-25 11:23:57 +02:00
parent 5a0963665d
commit 355d0debda
3 changed files with 60 additions and 1 deletions
+20
View File
@@ -68,6 +68,26 @@ impl Default for StopConfig {
}
}
use std::collections::BTreeMap;
use std::path::PathBuf;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ServerConfig {
pub name: String,
pub command: PathBuf,
#[serde(default)]
pub args: Vec<String>,
pub port: u16,
#[serde(default)]
pub env: BTreeMap<String, String>,
#[serde(default)]
pub working_dir: Option<PathBuf>,
#[serde(default)]
pub restart: RestartConfig,
#[serde(default)]
pub stop: StopConfig,
}
#[cfg(test)]
mod tests {
use super::*;