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:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-04 18:30:18 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-04 18:30:18 +0000
commit950c2e4e68448d2abcad90a31bfffaca6d7bc47e (patch)
tree6893c0b26234b2a809c6379492a7377875387f73 /src/config.rs
parenta19ff57e72d9b82a722e14ae365da7f8c2d87e87 (diff)
feat(sync): Phase 5 - negentropy catchup (NIP-77)
- Add NegentropyService for set reconciliation - Implement startup catchup with warm-up delay - Implement reconnect catchup (last 3 days) - Add daily catchup schedule with stagger
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 441a14d..0ca534c 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -91,6 +91,18 @@ pub struct Config {
91 /// Maximum backoff time in seconds for sync relay reconnection (default: 3600 = 1 hour) 91 /// 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)] 92 #[arg(long, env = "NGIT_SYNC_MAX_BACKOFF_SECS", default_value_t = 3600)]
93 pub sync_max_backoff_secs: u64, 93 pub sync_max_backoff_secs: u64,
94
95 /// Delay in seconds before running startup catchup (default: 30)
96 #[arg(long, env = "NGIT_SYNC_STARTUP_DELAY_SECS", default_value_t = 30)]
97 pub sync_startup_delay_secs: u64,
98
99 /// Delay in seconds before running reconnect catchup (default: 10)
100 #[arg(long, env = "NGIT_SYNC_RECONNECT_DELAY_SECS", default_value_t = 10)]
101 pub sync_reconnect_delay_secs: u64,
102
103 /// Number of days to look back for reconnect catchup (default: 3)
104 #[arg(long, env = "NGIT_SYNC_RECONNECT_LOOKBACK_DAYS", default_value_t = 3)]
105 pub sync_reconnect_lookback_days: u64,
94} 106}
95 107
96impl Config { 108impl Config {
@@ -148,6 +160,9 @@ impl Config {
148 metrics_top_n_repos: 10, 160 metrics_top_n_repos: 10,
149 sync_relay_url: None, 161 sync_relay_url: None,
150 sync_max_backoff_secs: 3600, 162 sync_max_backoff_secs: 3600,
163 sync_startup_delay_secs: 30,
164 sync_reconnect_delay_secs: 10,
165 sync_reconnect_lookback_days: 3,
151 } 166 }
152 } 167 }
153} 168}