diff options
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index a2a27be..441a14d 100644 --- a/src/config.rs +++ b/src/config.rs | |||
| @@ -87,6 +87,10 @@ pub struct Config { | |||
| 87 | /// URL of relay to sync kind 30617 events from (optional, enables proactive sync) | 87 | /// URL of relay to sync kind 30617 events from (optional, enables proactive sync) |
| 88 | #[arg(long, env = "NGIT_SYNC_RELAY_URL")] | 88 | #[arg(long, env = "NGIT_SYNC_RELAY_URL")] |
| 89 | pub sync_relay_url: Option<String>, | 89 | pub sync_relay_url: Option<String>, |
| 90 | |||
| 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)] | ||
| 93 | pub sync_max_backoff_secs: u64, | ||
| 90 | } | 94 | } |
| 91 | 95 | ||
| 92 | impl Config { | 96 | impl Config { |
| @@ -143,6 +147,7 @@ impl Config { | |||
| 143 | metrics_connection_per_ip_abuse_threshold: 10, | 147 | metrics_connection_per_ip_abuse_threshold: 10, |
| 144 | metrics_top_n_repos: 10, | 148 | metrics_top_n_repos: 10, |
| 145 | sync_relay_url: None, | 149 | sync_relay_url: None, |
| 150 | sync_max_backoff_secs: 3600, | ||
| 146 | } | 151 | } |
| 147 | } | 152 | } |
| 148 | } | 153 | } |