From b167f1b2ae7edbcab95554b5203d22d9e372c8b5 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 4 Dec 2025 17:03:40 +0000 Subject: feat(sync): Phase 1 MVP - single relay proactive sync - Add src/sync/ module with SyncManager - Add NGIT_SYNC_RELAY_URL config option - Subscribe to kind 30617 on configured relay - Validate synced events through Nip34WritePolicy - Integration test with two TestRelay instances --- src/config.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 025e020..a2a27be 100644 --- a/src/config.rs +++ b/src/config.rs @@ -83,6 +83,10 @@ pub struct Config { /// Number of top bandwidth repos to track in metrics #[arg(long = "metrics-top-n-repos", env = "NGIT_METRICS_TOP_N_REPOS", default_value_t = 10)] pub metrics_top_n_repos: usize, + + /// URL of relay to sync kind 30617 events from (optional, enables proactive sync) + #[arg(long, env = "NGIT_SYNC_RELAY_URL")] + pub sync_relay_url: Option, } impl Config { @@ -138,6 +142,7 @@ impl Config { metrics_enabled: true, metrics_connection_per_ip_abuse_threshold: 10, metrics_top_n_repos: 10, + sync_relay_url: None, } } } -- cgit v1.2.3