summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-10-14 18:29:02 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-10-14 18:29:02 +0200
commit6eae5a48378f150ee8325d8ce22561874178c957 (patch)
treefc760144f7889b9635b9ece1cee378b92dba6839 /src/config
parent77b7b1b04ed4039760d053cbd8fa05c7892ecb02 (diff)
Add speed and max number of jobs endpoint settings
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 40a48b5..3c48023 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -4,6 +4,7 @@ use std::ops::Deref;
use anyhow::Result;
use getset::Getters;
+use getset::CopyGetters;
use serde::Deserialize;
use crate::phase::PhaseName;
@@ -60,7 +61,7 @@ pub struct ContainerConfig {
}
-#[derive(Debug, Getters, Deserialize)]
+#[derive(Debug, Getters, CopyGetters, Deserialize)]
pub struct Endpoint {
#[getset(get = "pub")]
name: String,
@@ -70,6 +71,18 @@ pub struct Endpoint {
#[getset(get = "pub")]
endpoint_type: EndpointType,
+
+ /// Relative speed to other endpoints
+ ///
+ /// So if you have two servers, one with 12 cores and one with 24, you want to set "1" for the
+ /// first and "2" for the second (or "12" for the first and "24" for the second - the ratio is
+ /// the thing here)!
+ #[getset(get_copy = "pub")]
+ speed: usize,
+
+ /// Maximum number of jobs which are allowed on this endpoint
+ #[getset(get_copy = "pub")]
+ maxjobs: usize,
}
#[derive(Debug, Deserialize, Eq, PartialEq)]