From 5e8a68935f614100bbab7865e693b33856022a98 Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Mon, 16 Sep 2024 10:38:38 +0100 Subject: [PATCH] tools/unitctl: rename app -> apps, fix readme Signed-off-by: Gabor Javorszky --- tools/unitctl/README.md | 5 +++-- tools/unitctl/unitctl/src/main.rs | 2 +- tools/unitctl/unitctl/src/unitctl.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/unitctl/README.md b/tools/unitctl/README.md index 9f7e010b2..66d8f50d5 100644 --- a/tools/unitctl/README.md +++ b/tools/unitctl/README.md @@ -63,6 +63,7 @@ Commands: execute Sends raw JSON payload to Unit status Get the current status of Unit listeners List active listeners + apps List all configured Unit applications help Print this message or the help of the given subcommand(s) Options: @@ -150,7 +151,7 @@ Unitctl can also request from the API that an application be restarted. Listing applications: ``` -$ unitctl app list +$ unitctl apps list { "wasm": { "type": "wasm-wasi-component", @@ -161,7 +162,7 @@ $ unitctl app list Restarting an application: ``` -$ unitctl app reload wasm +$ unitctl apps reload wasm { "success": "Ok" } diff --git a/tools/unitctl/unitctl/src/main.rs b/tools/unitctl/unitctl/src/main.rs index 822b2ae77..dc3c09d19 100644 --- a/tools/unitctl/unitctl/src/main.rs +++ b/tools/unitctl/unitctl/src/main.rs @@ -34,7 +34,7 @@ async fn main() -> Result<(), UnitctlError> { match cli.command { Commands::Instances(args) => instances::cmd(args).await, - Commands::App(ref args) => applications::cmd(&cli, args).await, + Commands::Apps(ref args) => applications::cmd(&cli, args).await, Commands::Edit { output_format } => edit::cmd(&cli, output_format).await, diff --git a/tools/unitctl/unitctl/src/unitctl.rs b/tools/unitctl/unitctl/src/unitctl.rs index 322031cf1..d01d0356d 100644 --- a/tools/unitctl/unitctl/src/unitctl.rs +++ b/tools/unitctl/unitctl/src/unitctl.rs @@ -127,7 +127,7 @@ pub(crate) enum Commands { }, #[command(about = "List all configured Unit applications")] - App(ApplicationArgs), + Apps(ApplicationArgs), #[command(about = "Export the current configuration of UNIT")] Export {