Compare commits

..

1 commit

View file

@ -1,8 +1,4 @@
use std::{
collections::HashMap,
process::exit,
sync::{Arc, RwLock},
};
use std::{collections::HashMap, process::exit};
use crate::io_patagia_Hostd::{
Call_Apply, Call_Describe, Label, Machine, PatagiaAgentConfig, VarlinkInterface,
@ -10,9 +6,7 @@ use crate::io_patagia_Hostd::{
mod io_patagia_Hostd;
struct Hostd {
pub state: Arc<RwLock<i64>>,
}
struct Hostd;
impl VarlinkInterface for Hostd {
fn apply(&self, call: &mut dyn Call_Apply, machine: Machine) -> varlink::Result<()> {
@ -37,8 +31,7 @@ impl VarlinkInterface for Hostd {
}
fn main() {
let state = Arc::new(RwLock::new(0));
let hostd = Hostd { state };
let hostd = Hostd;
let hostd_interface = io_patagia_Hostd::new(Box::new(hostd));
let svc = varlink::VarlinkService::new(
@ -52,7 +45,7 @@ fn main() {
svc,
"unix:/tmp/io.patagia.Hostd",
&varlink::ListenConfig {
idle_timeout: 1,
idle_timeout: 0,
..Default::default()
},
);