commit | d9365b1cf5d2d74596b77ac4ac02d2dbd2b97d80 | [log] [tgz] |
---|---|---|
author | Francesco Timperi Tiberi <francesco.timperi@gmail.com> | Mon Dec 30 17:46:57 2024 +0100 |
committer | GitHub <noreply@github.com> | Mon Dec 30 17:46:57 2024 +0100 |
tree | e8dd55a546da747f7f347bb7ff975aaec99b076b | |
parent | c59be736472b1e36de14395aae32762082eb6eac [diff] | |
parent | 82809521f2c6706b1693d8e4f84c4d7bb4aaab5f [diff] |
Merge pull request #5 from giusdp/main Add GET endpoints and bug fixes
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 (use POST in case you need to send arguments to the action):
GET/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
GET/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
GET/POST /web/{namespace}/{action}
: to invoke an OpenWhisk web action on the given namespace, default package, and action name.
GET/POST /web/{namespace}/{package}/{action}
: to invoke an OpenWhisk web action on the given namespace, custom package, and action name.