From 63639eeaa9e39a3bb1d4c17144b11466d4f89490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Wed, 20 Nov 2019 13:52:45 +0100 Subject: [PATCH] More details about the request life cycle --- docs/source/theory/request_life_cycle.rst | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/source/theory/request_life_cycle.rst b/docs/source/theory/request_life_cycle.rst index 086386a..9d4033e 100644 --- a/docs/source/theory/request_life_cycle.rst +++ b/docs/source/theory/request_life_cycle.rst @@ -8,7 +8,7 @@ answered by the User HTTP Interface. #. The request is matched against the route table -#. Kapow! provides a HANDLER_ID to identify this request +#. Kapow! provides a `HANDLER_ID` to identify this request #. Kapow! spawns the binary specified as entrypoint in the matching route @@ -16,15 +16,18 @@ answered by the User HTTP Interface. The spawned entrypoint is run with the following variables added to its environment: - - KAPOW_HANDLER_ID - - KAPOW_DATAAPI_URL - - KAPOW_CONTROLAPI_URL + - ``KAPOW_HANDLER_ID``: Containing the `HANDLER_ID` + - ``KAPOW_DATAAPI_URL``: With the URL of the `data interface` + - ``KAPOW_CONTROLAPI_URL``: With the URL of the `control interface` #. During the lifetime of the shell, the request and response resources are available via these commands: - - kapow get /request/... - - kapow set /response/... + - ``kapow get /request/...`` + - ``kapow set /response/...`` + + These commands use the aforementioned environment variables to read + data of the user request and to write the response. TODO: link to resource tree -#. When the shell dies, Kapow! finalizes the original request. +#. When the shell dies, Kapow! finalizes the original request