about summary refs log tree commit diff stats
path: root/src/smd/context.rs
diff options
context:
space:
mode:
authoryuzu <yuzu@b9215c17-b818-4693-b096-d1e41a411fef>2025-07-09 20:24:36 +0000
committeryuzu <yuzu@b9215c17-b818-4693-b096-d1e41a411fef>2025-07-09 20:24:36 +0000
commitbc0fac1bf2a02c9a76c8c4b9eccc9235de4e86b2 (patch)
treeaa8bd79bacddd6830453e8a8beb5ea976155c5fe /src/smd/context.rs
parentb2cf95ed207e42d1f57de1e5b5030af8c734103b (diff)
downloadsalaryman-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.rs27
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,
+}