diff options
author | yuzu <yuzu@b9215c17-b818-4693-b096-d1e41a411fef> | 2025-07-12 22:17:26 +0000 |
---|---|---|
committer | yuzu <yuzu@b9215c17-b818-4693-b096-d1e41a411fef> | 2025-07-12 22:17:26 +0000 |
commit | e33f9a59f875edf1240ca80c1014235296ff3cbf (patch) | |
tree | 5777c00bafad650d6be84f42f51ba4f873d92c53 /src/smd/context.rs | |
parent | 78608add1c69a877b76a05147f6c26b7abe66669 (diff) | |
download | salaryman-e33f9a59f875edf1240ca80c1014235296ff3cbf.tar.gz salaryman-e33f9a59f875edf1240ca80c1014235296ff3cbf.tar.bz2 salaryman-e33f9a59f875edf1240ca80c1014235296ff3cbf.zip |
add additional endpoints; change out mutexes for rwlocks
git-svn-id: svn+ssh://diminuette.aengel.lesbianunix.dev/salaryman/trunk@15 b9215c17-b818-4693-b096-d1e41a411fef
Diffstat (limited to 'src/smd/context.rs')
-rw-r--r-- | src/smd/context.rs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/smd/context.rs b/src/smd/context.rs deleted file mode 100644 index 5d8038c..0000000 --- a/src/smd/context.rs +++ /dev/null @@ -1,47 +0,0 @@ -use salaryman::service::{Service, ServiceConf}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; -use std::sync::Arc; -use tokio::sync::Mutex; -use uuid::Uuid; - -pub struct SalarymanService { - pub config: ServiceConf, - pub service: Arc<Mutex<Service>>, -} -impl SalarymanService { - pub fn new() -> Self { - Self { - config: ServiceConf::new(), - service: Arc::new(Mutex::new(Service::new())), - } - } - pub fn from_parts(config: ServiceConf, service: Arc<Mutex<Service>>) -> Self { - Self { config, service } - } -} - -pub struct SalarymanDContext { - pub services: Vec<Arc<SalarymanService>>, -} -impl SalarymanDContext { - pub fn new() -> Self { - Self { - services: Vec::new(), - } - } - pub fn from_vec(services: Vec<Arc<SalarymanService>>) -> Self { - Self { services } - } -} - -#[derive(Serialize, Deserialize, JsonSchema, Debug)] -pub struct StdinBuffer { - pub stdin: String, - pub endl: Option<bool>, -} - -#[derive(Serialize, Deserialize, JsonSchema, Debug)] -pub struct ServicePath { - pub service_uuid: Uuid, -} |