Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core/blob/main/crates/spark-supervisor/src/config.rs # aien-sovereign-core Autonomous sovereign intelligence engine and runtime core for NVIDIA DGX Spark Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core / crates / spark-supervisor / src / config.rs` 33 lines ยท 846 bytes Raw Blame History 1 use serde::Deserialize; 2 use std::collections::HashMap; 3 use std::path::Path; 4 5 #[derive(Debug, Clone, Deserialize)] 6 pub struct ServiceConfig { 7 pub command: String, 8 #[serde(default)] 9 pub args: Vec, 10 #[serde(default)] 11 pub env: HashMap, 12 #[serde(default = "default_restart")] 13 pub restart: String, 14 pub health_url: Option, 15 } 16 17 fn default_restart() -> String { 18 "always".to_string() 19 } 20 21 #[derive(Debug, Clone, Deserialize)] 22 pub struct SupervisorConfig { 23 #[serde(default)] 24 pub services: HashMap, 25 } 26 27 impl SupervisorConfig { 28 pub fn load_from_file>(path: P) -> Result> { 29 let content = std::fs::read_to_string(path)?; 30 let cfg: SupervisorConfig = toml::from_str(&content)?; 31 Ok(cfg) 32 } 33 }