diff options
author | yuzu <yuzu@b9215c17-b818-4693-b096-d1e41a411fef> | 2025-07-09 20:24:36 +0000 |
---|---|---|
committer | yuzu <yuzu@b9215c17-b818-4693-b096-d1e41a411fef> | 2025-07-09 20:24:36 +0000 |
commit | bc0fac1bf2a02c9a76c8c4b9eccc9235de4e86b2 (patch) | |
tree | aa8bd79bacddd6830453e8a8beb5ea976155c5fe /src/smd/context.rs | |
parent | b2cf95ed207e42d1f57de1e5b5030af8c734103b (diff) | |
download | salaryman-bc0fac1bf2a02c9a76c8c4b9eccc9235de4e86b2.tar.gz salaryman-bc0fac1bf2a02c9a76c8c4b9eccc9235de4e86b2.tar.bz2 salaryman-bc0fac1bf2a02c9a76c8c4b9eccc9235de4e86b2.zip |
working network communication
git-svn-id: svn+ssh://diminuette.aengel.lesbianunix.dev/salaryman/trunk@13 b9215c17-b818-4693-b096-d1e41a411fef
Diffstat (limited to 'src/smd/context.rs')
-rw-r--r-- | src/smd/context.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/smd/context.rs b/src/smd/context.rs new file mode 100644 index 0000000..d8194c5 --- /dev/null +++ b/src/smd/context.rs @@ -0,0 +1,27 @@ +use super::Config; +use salaryman::service::Service; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use std::sync::Arc; +use tokio::sync::Mutex; + +pub struct SalarymanDContext { + pub config: Config, + pub service: Vec<Arc<Mutex<Service>>>, +} +impl SalarymanDContext { + pub fn new() -> Self { + Self { + config: Config::new(), + service: Vec::new(), + } + } + pub fn from_parts(config: Config, service: Vec<Arc<Mutex<Service>>>) -> Self { + Self { config, service } + } +} + +#[derive(Serialize, Deserialize, JsonSchema, Debug)] +pub struct StdinBuffer { + pub string: String, +} |