diff options
author | Alex Auvolat <lx@deuxfleurs.fr> | 2025-01-31 15:39:31 +0100 |
---|---|---|
committer | Alex Auvolat <lx@deuxfleurs.fr> | 2025-02-03 18:54:51 +0100 |
commit | 10bbb26b303e7bd58ca3396009a66b70a1673c0f (patch) | |
tree | 82b718338b1f6e2693d1345ca872bc2fbb652dcb /src/util/background/mod.rs | |
parent | 89ff9f5576f91dc127ba3cc1fae96543e27b9468 (diff) | |
download | garage-10bbb26b303e7bd58ca3396009a66b70a1673c0f.tar.gz garage-10bbb26b303e7bd58ca3396009a66b70a1673c0f.zip |
cli_v2: implement ListWorkers and GetWorkerInfo
Diffstat (limited to 'src/util/background/mod.rs')
-rw-r--r-- | src/util/background/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/util/background/mod.rs b/src/util/background/mod.rs index 607cd7a3..cae3a462 100644 --- a/src/util/background/mod.rs +++ b/src/util/background/mod.rs @@ -6,7 +6,6 @@ pub mod worker; use std::collections::HashMap; use std::sync::Arc; -use serde::{Deserialize, Serialize}; use tokio::sync::{mpsc, watch}; use worker::WorkerProcessor; @@ -18,7 +17,7 @@ pub struct BackgroundRunner { worker_info: Arc<std::sync::Mutex<HashMap<usize, WorkerInfo>>>, } -#[derive(Clone, Serialize, Deserialize, Debug)] +#[derive(Clone, Debug)] pub struct WorkerInfo { pub name: String, pub status: WorkerStatus, @@ -30,7 +29,7 @@ pub struct WorkerInfo { /// WorkerStatus is a struct returned by the worker with a bunch of canonical /// fields to indicate their status to CLI users. All fields are optional. -#[derive(Clone, Serialize, Deserialize, Debug, Default)] +#[derive(Clone, Debug, Default)] pub struct WorkerStatus { pub tranquility: Option<u32>, pub progress: Option<String>, |