core_api/host/
management.rs1use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5#[serde(rename_all = "camelCase")]
6pub struct HostRuntimeRequest<C> {
7 pub host_id: String,
8 #[serde(flatten)]
9 pub action: HostRuntimeAction<C>,
10}
11
12#[derive(Debug, Clone, Serialize, Deserialize)]
13#[serde(tag = "action", rename_all = "camelCase")]
14pub enum HostRuntimeAction<C> {
15 Inspect,
16 Metrics,
17 RestartOperation {
18 component: C,
19 #[serde(rename = "operationId")]
20 operation_id: String,
21 },
22 Plan {
23 components: Vec<C>,
24 #[serde(default)]
25 all: bool,
26 },
27 Start {
28 #[serde(rename = "planId")]
29 plan_id: String,
30 },
31 Operation {
32 #[serde(rename = "operationId")]
33 operation_id: String,
34 },
35}
36
37#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(rename_all = "camelCase")]
39pub struct HostRuntimeResponse {
40 pub host_id: String,
41 pub data: serde_json::Value,
42}