feat(protocol): ServerConfig + ConfigError + RpcErrorCode
This commit is contained in:
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user