server: split off varlink-related code to separate module
Build and test / check (push) Failing after 40s
Build and test / build (push) Successful in 1m37s
Build and test / test (push) Successful in 1m56s
Build and test / docs (push) Successful in 3m47s

This commit is contained in:
2026-01-09 04:47:19 +09:00
parent def1ff330c
commit dfa0f5a406
6 changed files with 127 additions and 112 deletions
+4 -3
View File
@@ -10,8 +10,9 @@ use anyhow::Context;
use clap::Parser;
use roowho2_lib::{
proto::WhodStatusUpdate,
server::rwhod::{
rwhod_client_server_task, rwhod_packet_receiver_task, rwhod_packet_sender_task,
server::{
rwhod::{rwhod_packet_receiver_task, rwhod_packet_sender_task},
varlink_api::varlink_client_server_task,
},
};
use tokio::{net::UdpSocket, sync::RwLock};
@@ -131,7 +132,7 @@ async fn client_server(
unsafe { std::os::unix::net::UnixListener::from_raw_fd(socket_fd.as_raw_fd()) };
std_socket.set_nonblocking(true)?;
let zlink_listener = zlink::unix::Listener::try_from(OwnedFd::from(std_socket))?;
let client_server_task = rwhod_client_server_task(zlink_listener, whod_status_store);
let client_server_task = varlink_client_server_task(zlink_listener, whod_status_store);
client_server_task.await?;
+1 -1
View File
@@ -2,7 +2,7 @@ use anyhow::Context;
use chrono::{Duration, Utc};
use clap::Parser;
use roowho2_lib::{proto::WhodStatusUpdate, server::rwhod::RwhodClientProxy};
use roowho2_lib::{proto::WhodStatusUpdate, server::varlink_api::RwhodClientProxy};
/// Show host status of local machines.
///
+1 -1
View File
@@ -1,6 +1,6 @@
use anyhow::Context;
use clap::Parser;
use roowho2_lib::{proto::WhodUserEntry, server::rwhod::RwhodClientProxy};
use roowho2_lib::{proto::WhodUserEntry, server::varlink_api::RwhodClientProxy};
/// Check who is logged in on local machines.
///