feat: read bootstrap Starchart nodes from config
This commit is contained in:
parent
f42e06358e
commit
ac7c1e4066
2 changed files with 9 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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))]
|
||||
|
|
Loading…
Reference in a new issue