Expand description
Apache OpenWhisk serverless-upstream plugin (openwhisk).
Port of APISIX’s openwhisk plugin (3.17). Invokes an OpenWhisk action
(blocking, with the result inlined) and returns the action’s reply as the
gateway response — it replaces the upstream, so the node’s success
port should be wired straight to client.in.
The request body is POSTed as the action parameters to
<api_host>/api/v1/namespaces/<namespace>/actions/<package/><action>?blocking=true&result=<result>&timeout=<ms>
with an Authorization: Basic <base64(service_token)> header.
§Response mapping
OpenWhisk returns a JSON envelope. An action may return just a body, or set
statusCode and headers explicitly. map_response mirrors APISIX:
statusCode (when present) becomes the response status, headers are
applied, and body (or the raw envelope when absent) becomes the body. A
non-JSON envelope fails the node with 503 through the error port.
Structs§
- Mapped
Response 🔒 - The status, headers, and body mapped out of an OpenWhisk envelope.
- Open
Whisk Plugin - Invokes an OpenWhisk action and maps its reply into
Context.response.
Functions§
- map_
response 🔒 - Maps an OpenWhisk activation reply into a
(status, headers, body)triple. - reject 🔒
- Builds the
OPENWHISK_CALLOUT_ERRORrejection carrying the context.