This commit is contained in:
2026-05-22 08:40:04 +02:00
parent 749638b75c
commit 777fcf168e
13 changed files with 74 additions and 56 deletions
+7 -7
View File
@@ -9,6 +9,13 @@ pub type Database = SqlitePool;
pub type DeviceCounts = DashMap<String, Arc<AtomicUsize>>;
pub type Registry = DashMap<(String, String), RegistryEntry>;
pub struct AppState {
pub database: Database,
pub registry: Arc<Registry>,
pub device_counts: Arc<DeviceCounts>,
pub config: Arc<Config>,
}
pub struct RegistryEntry {
pub sender: mpsc::Sender<PendingExec>,
pub in_flight: Arc<AtomicUsize>,
@@ -26,10 +33,3 @@ pub struct PendingExec {
pub command: String,
pub reply: oneshot::Sender<ExecResult>,
}
pub struct AppState {
pub database: Database,
pub registry: Arc<Registry>,
pub device_counts: Arc<DeviceCounts>,
pub config: Arc<Config>,
}