Skip to main content

harn_cli/commands/orchestrator/
mod.rs

1pub(crate) mod common;
2mod deploy;
3mod dlq;
4pub(crate) mod errors;
5mod fire;
6pub mod harness;
7mod inspect;
8pub(crate) mod inspect_data;
9pub(crate) mod listener;
10mod origin_guard;
11mod queue;
12mod recover;
13mod reload;
14mod replay;
15mod replay_oracle;
16mod resume;
17pub(crate) mod role;
18mod serve;
19mod stats;
20mod tenant;
21pub mod tls;
22
23#[allow(unused_imports)]
24pub(crate) use errors::{OrchestratorError, OrchestratorResult};
25
26use crate::cli::{OrchestratorArgs, OrchestratorCommand};
27
28pub(crate) async fn handle(args: OrchestratorArgs) -> OrchestratorResult<()> {
29    match args.command {
30        OrchestratorCommand::Serve(serve_args) => serve::run(serve_args).await,
31        OrchestratorCommand::Deploy(deploy_args) => deploy::run(*deploy_args).await,
32        OrchestratorCommand::Reload(reload_args) => reload::run(reload_args).await,
33        OrchestratorCommand::Inspect(inspect_args) => inspect::run(inspect_args).await,
34        OrchestratorCommand::Stats(stats_args) => stats::run(stats_args).await,
35        OrchestratorCommand::Fire(fire_args) => fire::run(fire_args).await,
36        OrchestratorCommand::Replay(replay_args) => replay::run(replay_args).await,
37        OrchestratorCommand::ReplayOracle(replay_oracle_args) => {
38            replay_oracle::run(replay_oracle_args).await
39        }
40        OrchestratorCommand::Resume(resume_args) => resume::run(resume_args).await,
41        OrchestratorCommand::Dlq(dlq_args) => dlq::run(dlq_args).await,
42        OrchestratorCommand::Queue(queue_args) => queue::run(queue_args).await,
43        OrchestratorCommand::Recover(recover_args) => recover::run(recover_args).await,
44        OrchestratorCommand::Tenant(tenant_args) => tenant::run(tenant_args).await,
45    }
46}