summaryrefslogtreecommitdiffhomepage
path: root/tools/unitctl/README.md
diff options
context:
space:
mode:
authorAva Hahn <a.hahn@f5.com>2024-06-14 21:04:15 -0700
committerAva Hahn <110854134+avahahn@users.noreply.github.com>2024-06-18 16:21:10 -0700
commite0c15ae4575335fb079e2d33fc853a547b2380c9 (patch)
treece2a4e6eb80f79d1bb2d89c5667c71dbf11d375e /tools/unitctl/README.md
parentd96d583328f614c658d42f5bb0d2a0f81621327e (diff)
downloadunit-e0c15ae4575335fb079e2d33fc853a547b2380c9.tar.gz
unit-e0c15ae4575335fb079e2d33fc853a547b2380c9.tar.bz2
tools/unitctl: implement application subcommand
* application subcommand UI schema * application subcommand handler * additions to unit-client-rs to expose application API * elaborate on OpenAPI error handling * adds wasm and wasi app schemas to OpenAPI Schema * updates tools/unitctl OpenAPI library * many linter fixes * README.md updates Signed-off-by: Ava Hahn <a.hahn@f5.com>
Diffstat (limited to 'tools/unitctl/README.md')
-rw-r--r--tools/unitctl/README.md26
1 files changed, 23 insertions, 3 deletions
diff --git a/tools/unitctl/README.md b/tools/unitctl/README.md
index 2e5a2da1..dca16e63 100644
--- a/tools/unitctl/README.md
+++ b/tools/unitctl/README.md
@@ -31,13 +31,13 @@ their own makefile targets. Alternatively, all available binary targets can be
built with `make all`. See the below example for illustration:
```
-[ava@calliope cli]$ make list-targets
+$ make list-targets
x86_64-unknown-linux-gnu
-[ava@calliope cli]$ make x86_64-unknown-linux-gnu
+$ make x86_64-unknown-linux-gnu
▶ building unitctl with flags [--quiet --release --bin unitctl --target x86_64-unknown-linux-gnu]
-[ava@calliope cli]$ file ./target/x86_64-unknown-linux-gnu/release/unitctl
+$ file ./target/x86_64-unknown-linux-gnu/release/unitctl
./target/x86_64-unknown-linux-gnu/release/unitctl: ELF 64-bit LSB pie executable,
x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=ef4b094ffd549b39a8cb27a7ba2cc0dbad87a3bc, for GNU/Linux 4.4.0,
@@ -91,6 +91,26 @@ To the subcommand `unitctl instances new` the user must provide three things:
After deployment the user will have one Unit container running on the host network.
+### Lists active applications and provides means to restart them
+Listing applications:
+```
+$ unitctl app list
+{
+ "wasm": {
+ "type": "wasm-wasi-component",
+ "component": "/www/wasmapp-proxy-component.wasm"
+ }
+}
+```
+
+Restarting an application:
+```
+$ unitctl app reload wasm
+{
+ "success": "Ok"
+}
+```
+
### Lists active listeners from running Unit processes
```
unitctl listeners