cli_v2: implement ListWorkers and GetWorkerInfo

This commit is contained in:
Alex Auvolat
2025-01-31 15:39:31 +01:00
parent 89ff9f5576
commit 10bbb26b30
13 changed files with 325 additions and 189 deletions
+2 -10
View File
@@ -111,19 +111,11 @@ macro_rules! local_admin_endpoints {
}
$(
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct [< $endpoint Request >] {
pub node: String,
pub body: [< Local $endpoint Request >],
}
pub type [< $endpoint Request >] = MultiRequest< [< Local $endpoint Request >] >;
pub type [< $endpoint RequestBody >] = [< Local $endpoint Request >];
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct [< $endpoint Response >] {
pub success: HashMap<String, [< Local $endpoint Response >] >,
pub error: HashMap<String, String>,
}
pub type [< $endpoint Response >] = MultiResponse< [< Local $endpoint Response >] >;
impl From< [< Local $endpoint Request >] > for LocalAdminApiRequest {
fn from(req: [< Local $endpoint Request >]) -> LocalAdminApiRequest {