huskies: merge 761
This commit is contained in:
@@ -110,6 +110,20 @@ pub struct ProjectConfig {
|
||||
/// Default: 3. Set to 0 to disable mesh discovery entirely.
|
||||
#[serde(default = "default_max_mesh_peers")]
|
||||
pub max_mesh_peers: usize,
|
||||
/// Base URL of the gateway this project should push status events to.
|
||||
///
|
||||
/// When set, a relay task is started that connects to the gateway's
|
||||
/// `/gateway/events/push` WebSocket and forwards every [`StatusEvent`] from
|
||||
/// the local broadcaster. Example: `gateway_url = "http://gateway:3000"`.
|
||||
/// Disabled when absent. Also readable from the `HUSKIES_GATEWAY_URL`
|
||||
/// environment variable.
|
||||
#[serde(default)]
|
||||
pub gateway_url: Option<String>,
|
||||
/// Project name this instance identifies as when pushing events to the
|
||||
/// gateway. Defaults to the project root directory name when not set.
|
||||
/// Example: `gateway_project = "huskies"`.
|
||||
#[serde(default)]
|
||||
pub gateway_project: Option<String>,
|
||||
}
|
||||
|
||||
/// Configuration for the filesystem watcher's sweep behaviour.
|
||||
@@ -317,6 +331,8 @@ impl Default for ProjectConfig {
|
||||
crdt_require_token: false,
|
||||
crdt_tokens: Vec::new(),
|
||||
max_mesh_peers: default_max_mesh_peers(),
|
||||
gateway_url: None,
|
||||
gateway_project: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -403,6 +419,8 @@ impl ProjectConfig {
|
||||
crdt_require_token: false,
|
||||
crdt_tokens: Vec::new(),
|
||||
max_mesh_peers: default_max_mesh_peers(),
|
||||
gateway_url: None,
|
||||
gateway_project: None,
|
||||
};
|
||||
validate_agents(&config.agent)?;
|
||||
return Ok(config);
|
||||
@@ -440,6 +458,8 @@ impl ProjectConfig {
|
||||
crdt_require_token: false,
|
||||
crdt_tokens: Vec::new(),
|
||||
max_mesh_peers: default_max_mesh_peers(),
|
||||
gateway_url: None,
|
||||
gateway_project: None,
|
||||
};
|
||||
validate_agents(&config.agent)?;
|
||||
Ok(config)
|
||||
@@ -465,6 +485,8 @@ impl ProjectConfig {
|
||||
crdt_require_token: false,
|
||||
crdt_tokens: Vec::new(),
|
||||
max_mesh_peers: default_max_mesh_peers(),
|
||||
gateway_url: None,
|
||||
gateway_project: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user