diff options
author | Ava Hahn <a.hahn@f5.com> | 2024-06-14 21:04:15 -0700 |
---|---|---|
committer | Ava Hahn <110854134+avahahn@users.noreply.github.com> | 2024-06-18 16:21:10 -0700 |
commit | e0c15ae4575335fb079e2d33fc853a547b2380c9 (patch) | |
tree | ce2a4e6eb80f79d1bb2d89c5667c71dbf11d375e /docs | |
parent | d96d583328f614c658d42f5bb0d2a0f81621327e (diff) | |
download | unit-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 'docs')
-rw-r--r-- | docs/unit-openapi.yaml | 85 |
1 files changed, 84 insertions, 1 deletions
diff --git a/docs/unit-openapi.yaml b/docs/unit-openapi.yaml index b2e02e89..f69e615c 100644 --- a/docs/unit-openapi.yaml +++ b/docs/unit-openapi.yaml @@ -4730,6 +4730,9 @@ components: isolation: rootfs: "/www/" + wasiapp: + type: "wasm-wasi-component" + # /config/listeners configListeners: summary: "Multiple listeners" @@ -5304,6 +5307,8 @@ components: - $ref: "#/components/schemas/configApplicationPHP" - $ref: "#/components/schemas/configApplicationPython" - $ref: "#/components/schemas/configApplicationRuby" + - $ref: "#/components/schemas/configApplicationWasm" + - $ref: "#/components/schemas/configApplicationWasi" discriminator: propertyName: type @@ -5314,6 +5319,8 @@ components: php: "#/components/schemas/configApplicationPHP" python: "#/components/schemas/configApplicationPython" ruby: "#/components/schemas/configApplicationRuby" + wasm: "#/components/schemas/configApplicationWasm" + wasm-wasi-component: "#/components/schemas/configApplicationWasi" # ABSTRACT BASE SCHEMA, NOT PRESENT IN THE CONFIGURATION; STORES COMMON OPTIONS configApplicationCommon: @@ -5326,7 +5333,7 @@ components: type: type: string description: "Application type and language version." - enum: [external, java, perl, php, python, ruby] + enum: [external, java, perl, php, python, ruby, wasm, wasm-wasi-component] environment: type: object @@ -5592,6 +5599,82 @@ components: description: "Number of worker threads per app process." default: 1 + configApplicationWasm: + description: "WASM application on Unit." + allOf: + - $ref: "#/components/schemas/configApplicationCommon" + - type: object + required: + - module + - request_handler + - malloc_handler + - free_handler + + properties: + module: + type: string + description: "Path to WebAssembly module." + + request_handler: + type: string + description: "Name of request handling function." + + malloc_handler: + type: string + description: "Name of memory allocator function." + + free_handler: + type: string + description: "Name of memory free function." + + access: + type: object + properties: + filesystem: + $ref: "#/components/schemas/stringArray" + description: "Host directories this application may have access to." + + module_init_handler: + type: string + description: "Name of function called to initialize module." + + module_end_handler: + type: string + description: "Name of function called to teardown module." + + request_init_handler: + type: string + description: "Name of function called to initialize request." + + request_end_handler: + type: string + description: "Name of function called to teardown request." + + response_end_handler: + type: string + description: "Name of function called to teardown response." + + + configApplicationWasi: + description: "WASI application on Unit." + allOf: + - $ref: "#/components/schemas/configApplicationCommon" + - type: object + required: + - component + + properties: + component: + type: string + description: "Path to wasm wasi component application." + + access: + type: object + properties: + filesystem: + $ref: "#/components/schemas/stringArray" + description: "Host directories this application may have access to." + configApplicationPHP: description: "PHP application on Unit." allOf: |