dora_message/
cli_to_coordinator.rs1use std::{collections::BTreeMap, path::PathBuf, time::Duration};
2
3use uuid::Uuid;
4
5use crate::{
6 common::GitSource,
7 descriptor::Descriptor,
8 id::{NodeId, OperatorId},
9 BuildId, SessionId,
10};
11
12#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
13pub enum ControlRequest {
14 Build {
15 session_id: SessionId,
16 dataflow: Descriptor,
17 git_sources: BTreeMap<NodeId, GitSource>,
18 prev_git_sources: BTreeMap<NodeId, GitSource>,
19 local_working_dir: Option<PathBuf>,
27 uv: bool,
28 },
29 WaitForBuild {
30 build_id: BuildId,
31 },
32 Start {
33 build_id: Option<BuildId>,
34 session_id: SessionId,
35 dataflow: Descriptor,
36 name: Option<String>,
37 local_working_dir: Option<PathBuf>,
45 uv: bool,
46 },
47 WaitForSpawn {
48 dataflow_id: Uuid,
49 },
50 Reload {
51 dataflow_id: Uuid,
52 node_id: NodeId,
53 operator_id: Option<OperatorId>,
54 },
55 Check {
56 dataflow_uuid: Uuid,
57 },
58 Stop {
59 dataflow_uuid: Uuid,
60 grace_duration: Option<Duration>,
61 },
62 StopByName {
63 name: String,
64 grace_duration: Option<Duration>,
65 },
66 Logs {
67 uuid: Option<Uuid>,
68 name: Option<String>,
69 node: String,
70 },
71 Destroy,
72 List,
73 DaemonConnected,
74 ConnectedMachines,
75 LogSubscribe {
76 dataflow_id: Uuid,
77 level: log::LevelFilter,
78 },
79 BuildLogSubscribe {
80 build_id: BuildId,
81 level: log::LevelFilter,
82 },
83 CliAndDefaultDaemonOnSameMachine,
84}