commit | 6e1d62096083aab5e66a72ce78b23df3acd2824a | [log] [tgz] |
---|---|---|
author | Giuseppe De Palma <dpl.gsp@tutanota.com> | Mon Dec 30 12:19:00 2024 +0100 |
committer | Giuseppe De Palma <dpl.gsp@tutanota.com> | Mon Dec 30 12:19:00 2024 +0100 |
tree | 31a7e64b6c9c98ed30487a6674281d919f6ff6d7 | |
parent | 7461817ae0d512cb40a28e6ee208732681dd8b23 [diff] |
fix: early close channel
The OpenServerless streamer is a tool to relay a stream from OpenWhisk actions to an outside HTTP client.
The streamer is a simple HTTP server that exposes an endpoint /stream/{namespace}/{action} to invoke the relative OpenWhisk action, open a socket for the action to write to, and relay the output to the client.
It expects 2 environment variables to be set:
OW_APIHOST
: the OpenWhisk API hostSTREAMER_ADDR
: the address of the streamer server for the OpenWhisk actions to connect toOther environment variables can be set to configure the streamer:
HTTP_SERVER_PORT
: the port the streamer server listens on (default: 8181)The streamer exposes the following endpoints:
POST /action/{namespace}/{action}
: to invoke the OpenWhisk action on the given namespace, default package, and action name. It requires an a Authorization header with Bearer token with the OpenWhisk AUTH token
POST /action/{namespace}/{package}/{action}
: to invoke the OpenWhisk action on the given namespace, custom package, and action name. It requires an a Authorization header with Bearer token with the OpenWhisk AUTH token
POST /web/{namespace}/{action}
: to invoke an OpenWhisk web action on the given namespace, default package, and action name.
POST /web/{namespace}/{package}/{action}
: to invoke an OpenWhisk web action on the given namespace, custom package, and action name.