feat: read bootstrap Starchart nodes from config

This commit is contained in:
Aravinth Manivannan 2023-02-28 16:38:43 +05:30
parent f42e06358e
commit ac7c1e4066
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 9 additions and 0 deletions

View file

@ -37,5 +37,8 @@ items_per_api_call = 20
client_timeout = 60 # of HTTP client involved in crawling. In seconds.
wait_before_next_api_call = 2 # in seconds
[introducer]
nodes = []
[repository]
root = "/tmp/starchart.forgeflux.org"

View file

@ -126,6 +126,11 @@ pub struct Crawler {
pub wait_before_next_api_call: u64,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Introducer {
pub nodes: Vec<Url>,
}
#[derive(Debug, Validate, Clone, PartialEq, Serialize, Deserialize)]
pub struct Settings {
pub log: LogLevel,
@ -138,6 +143,7 @@ pub struct Settings {
#[validate(email)]
pub admin_email: String,
pub crawler: Crawler,
pub introducer: Introducer,
}
#[cfg(not(tarpaulin_include))]