upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/config.rs b/src/config.rs
index 07e67c8..69a160a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -84,9 +84,10 @@ pub struct Config {
84 #[arg(long = "metrics-top-n-repos", env = "NGIT_METRICS_TOP_N_REPOS", default_value_t = 10)] 84 #[arg(long = "metrics-top-n-repos", env = "NGIT_METRICS_TOP_N_REPOS", default_value_t = 10)]
85 pub metrics_top_n_repos: usize, 85 pub metrics_top_n_repos: usize,
86 86
87 /// URL of relay to sync kind 30617 events from (optional, enables proactive sync) 87 /// URL of bootstrap relay to sync from on startup (optional)
88 #[arg(long, env = "NGIT_SYNC_RELAY_URL")] 88 /// Sync discovers additional relays from repository announcements that list our service
89 pub sync_relay_url: Option<String>, 89 #[arg(long, env = "NGIT_SYNC_BOOTSTRAP_RELAY_URL")]
90 pub sync_bootstrap_relay_url: Option<String>,
90 91
91 /// Maximum backoff time in seconds for sync relay reconnection (default: 3600 = 1 hour) 92 /// Maximum backoff time in seconds for sync relay reconnection (default: 3600 = 1 hour)
92 #[arg(long, env = "NGIT_SYNC_MAX_BACKOFF_SECS", default_value_t = 3600)] 93 #[arg(long, env = "NGIT_SYNC_MAX_BACKOFF_SECS", default_value_t = 3600)]
@@ -163,11 +164,12 @@ impl Config {
163 metrics_enabled: true, 164 metrics_enabled: true,
164 metrics_connection_per_ip_abuse_threshold: 10, 165 metrics_connection_per_ip_abuse_threshold: 10,
165 metrics_top_n_repos: 10, 166 metrics_top_n_repos: 10,
166 sync_relay_url: None, 167 sync_bootstrap_relay_url: None,
167 sync_max_backoff_secs: 3600, 168 sync_max_backoff_secs: 3600,
168 sync_startup_delay_secs: 30, 169 sync_startup_delay_secs: 30,
169 sync_reconnect_delay_secs: 10, 170 sync_reconnect_delay_secs: 10,
170 sync_reconnect_lookback_days: 3, 171 sync_reconnect_lookback_days: 3,
172 sync_startup_jitter_ms: 10_000,
171 } 173 }
172 } 174 }
173} 175}