ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/salaryman/trunk/src/smd/context.rs
Revision: 13
Committed: Wed Jul 9 20:24:36 2025 UTC (3 months ago) by yuzu
File size: 640 byte(s)
Log Message:
working network communication

File Contents

# Content
1 use super::Config;
2 use salaryman::service::Service;
3 use schemars::JsonSchema;
4 use serde::{Deserialize, Serialize};
5 use std::sync::Arc;
6 use tokio::sync::Mutex;
7
8 pub struct SalarymanDContext {
9 pub config: Config,
10 pub service: Vec<Arc<Mutex<Service>>>,
11 }
12 impl SalarymanDContext {
13 pub fn new() -> Self {
14 Self {
15 config: Config::new(),
16 service: Vec::new(),
17 }
18 }
19 pub fn from_parts(config: Config, service: Vec<Arc<Mutex<Service>>>) -> Self {
20 Self { config, service }
21 }
22 }
23
24 #[derive(Serialize, Deserialize, JsonSchema, Debug)]
25 pub struct StdinBuffer {
26 pub string: String,
27 }