Module control

Module control 

Source
Expand description

IPC control layer between the CLI and the daemon.

Transport: Unix domain socket at ~/.local/share/billpouch/control.sock. Framing: one UTF-8 JSON object per line (newline-delimited JSON).

The CLI sends a single protocol::ControlRequest and reads a single protocol::ControlResponse, then closes the connection. The daemon handles each connection in its own tokio::spawned task.

§Sub-modules

  • protocol — request/response types and typed data payloads.
  • server — async Unix listener, dispatcher, and DaemonState.

Re-exports§

pub use protocol::ControlRequest;
pub use protocol::ControlResponse;
pub use server::run_control_server;
pub use server::DaemonState;

Modules§

protocol
JSON-RPC–style control protocol between the CLI and the daemon.
server
Unix socket control server — runs inside the daemon. Each CLI invocation connects, sends one JSON request, reads one JSON response, then closes the connection.