summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorChristoph Prokop <christoph.prokop@atos.net>2021-04-13 10:49:54 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-04-13 11:28:58 +0200
commit441ae36017058ecbf66951c26176f24fb809471d (patch)
tree4d606c6f4ccc4c85fd451c91f132da0ee7cfd224 /src/config
parentb1d9a89c93eb500bfd14f236830b8bdc73f2ee74 (diff)
Add configurable timeout
This patch adds a configurable timeout value (default 10 seconds) in the Endpoint struct. This way we get an error if the connection to the endpoint is stalled. Signed-off-by: Christoph Prokop <christoph.prokop@atos.net> Pair-programmed-with: Matthias Beyer <matthias.beyer@atos.net> Suggested-by: Matthias Beyer <matthias.beyer@atos.net> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/endpoint_config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config/endpoint_config.rs b/src/config/endpoint_config.rs
index 69405dc..05d420f 100644
--- a/src/config/endpoint_config.rs
+++ b/src/config/endpoint_config.rs
@@ -50,6 +50,10 @@ pub struct Endpoint {
#[getset(get = "pub")]
network_mode: Option<String>,
+
+ /// Duration length of timeout for connecting endpoint
+ #[getset(get = "pub")]
+ timeout: Option<u64>,
}
/// The type of an endpoint