From 0a03ee1bf48738cab158dc516d16e75e38d43640 Mon Sep 17 00:00:00 2001 From: amokfa Date: Mon, 11 Nov 2024 10:33:42 +0530 Subject: [PATCH] chore: update docs --- configs/config.toml | 6 +++--- docs/apps.md | 7 ------- docs/design.md | 2 +- docs/downloader.md | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/configs/config.toml b/configs/config.toml index 1e328f75..9ccf89fb 100644 --- a/configs/config.toml +++ b/configs/config.toml @@ -1,7 +1,7 @@ # Collection of binaries which uplink can spawn as a process # This ensures that user is protected against random actions # triggered from cloud. -processes = [{ name = "echo", timeout = 10 }] +processes = [{ name = "echo" }] # Map of action names for re-routing on partial completion. An action is considered # partially completed when progress is 100, but status is neither "Failed" nor "Completed". @@ -9,7 +9,7 @@ action_redirections = { "firmware_update" = "install_update", "send_file" = "loa # Script runner allows users to trigger an action that will run an already downloaded # file as described by the download_path field of the JSON payload of a download action. -script_runner = [{ name = "run_script", timeout = 10 }] +script_runner = [{ name = "run_script" }] # Location on disk for persisted streams to write backlogs into, also used to write persistence_path = "/tmp/uplink/" @@ -149,7 +149,7 @@ priority = 255 [downloader] actions = [ { name = "update_firmware" }, - { name = "send_file", timeout = 10 }, + { name = "send_file" }, { name = "send_script" }, ] path = "/var/tmp/ota-file" diff --git a/docs/apps.md b/docs/apps.md index 33b31f6c..f4185f9d 100644 --- a/docs/apps.md +++ b/docs/apps.md @@ -73,13 +73,6 @@ An example success response to an action with the id `"123"`, would look like: } ``` -> **NOTE:** There is a timeout mechanism which on being triggered will send a ***Failed*** response to platform and stop forwarding any *Progress* responses from the connected applications. In order to not trigger this timeout, an application must send a ***Failed*** or ***Completed*** response before the action timeout. Once an action has timedout, a failure response is sent and all it's future responses are dropped. Action timeouts can be configured per action when setting up uplink, as follows: -> ``` -> [tcpapps.main_app] -> port = 5050 -> actions = [{ name = "abc", timeout = 300 }] # Allow the connected app to send responses for action abc upto 5 minutes from receive, send a failure response and drop all responses afterwards if not yet completed. -> ``` - ## Demonstration We have provided examples written in python and golang to demonstrate how you can receive Actions and reply back with either data or responses. You can checkout the examples provided in the `demo/` directory and execute them as such: 1. Ensure uplink is running on the device, connected to relevant broker and using the following config: diff --git a/docs/design.md b/docs/design.md index 02549702..a6b9b427 100644 --- a/docs/design.md +++ b/docs/design.md @@ -52,7 +52,7 @@ Self Instrumentation * Total incoming and outgoing data throughput * Number of files in disk * Total backlog size -* Rougue data. Receiving data of invalid channels. Report first incident +* Rogue data. Receiving data of invalid channels. Report first incident and frequency for a given time period * This can be a hashmap diff --git a/docs/downloader.md b/docs/downloader.md index f9fe0fa3..3e8be786 100644 --- a/docs/downloader.md +++ b/docs/downloader.md @@ -6,7 +6,7 @@ As described in the [example `config.toml`](https://github.com/bytebeamio/uplink Here is one more example config to illustrate how uplink can be configured: ``` [downloader] -actions = [{ name = "update_firmware", timeout = 3600 }] // sets the timeout to 1hr, allowing for uplink to wait for a whole hour before timing out the download, useful for large downloads over slower networks +actions = [{ name = "update_firmware }] path = "/data/local/downloads" // downloads the file into a location commonly seen in Android systems, i.e. /data/local/downloads/update_firmware ```