From 9aad5aa70f401c66b488ec8a28ce75b50bdcb49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Fri, 22 Nov 2019 09:32:26 +0100 Subject: [PATCH] Fix style in Request Life Cycle section. Co-authored-by: pancho horrillo --- docs/source/theory/request_life_cycle.rst | 48 ++++++++++++----------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/docs/source/theory/request_life_cycle.rst b/docs/source/theory/request_life_cycle.rst index be45273..7e8810b 100644 --- a/docs/source/theory/request_life_cycle.rst +++ b/docs/source/theory/request_life_cycle.rst @@ -8,49 +8,53 @@ answered by the `User HTTP Interface`. 1. request +---------- - The user makes a request to the `User HTTP Interface`. +The user makes a request to the `User HTTP Interface`. - - The request is matched against the route table +- The request is matched against the route table - - ``kapow`` provides a `HANDLER_ID` to identify this request and don't mix it - with other requests that could be running concurrently. +- ``kapow`` provides a `HANDLER_ID` to identify this request and don't mix it + with other requests that could be running concurrently. 2. spawn +-------- - ``kapow`` spawns the executable specified as entrypoint in the matching - route. +``kapow`` spawns the executable specified as entrypoint in the matching +route. - The default entrypoint is ``/bin/sh``; we'll explain this workflow for now. +The default entrypoint is ``/bin/sh``; we'll explain this workflow for now. - The spawned entrypoint is run with the following variables added to its - environment: +The spawned entrypoint is run with the following variables added to its +environment: - - ``KAPOW_HANDLER_ID``: Containing the `HANDLER_ID` - - ``KAPOW_DATAAPI_URL``: With the URL of the `Data HTTP Interface` - - ``KAPOW_CONTROLAPI_URL``: With the URL of the `Control HTTP Interface` +- ``KAPOW_HANDLER_ID``: Containing the `HANDLER_ID` +- ``KAPOW_DATAAPI_URL``: With the URL of the `Data HTTP Interface` +- ``KAPOW_CONTROLAPI_URL``: With the URL of the `Control HTTP Interface` 3. ``kapow set /response/body banana`` +-------------------------------------- - During the lifetime of the shell, the request and response resources are - available via these commands: +During the lifetime of the shell, the request and response resources are +available via these commands: - - ``kapow get /request/...`` +- ``kapow get /request/...`` - - ``kapow set /response/...`` +- ``kapow set /response/...`` - - These commands use the aforementioned environment variables to read data from - the user request and to write the response. - - - They accept data either as arguments or from stdin. +These commands use the aforementioned environment variables to read data +from the user request and to write the response. They accept data +either as arguments or from ``stdin``. 4. exit +------- - The shell dies. +The shell dies. 5. response +----------- - ``kapow`` finalizes the original request. +``kapow`` finalizes the original request. .. todo::