diff options
| author | tv <tv@krebsco.de> | 2026-11-03 00:26:42 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-03 00:26:42 +0100 |
| commit | c070bef0c1005366104176c1fc5af8b8f63cf01f (patch) | |
| tree | eab3e6da7d2b0b4f2648a452a23b5f592091301a /src/config | |
| parent | 5e62e09d6fe2a03c7fdcda63c879d8fdd1dfb7b1 (diff) | |
add stream heartbeat
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/mod.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 628f0ff..a6f70aa 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -250,6 +250,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ "Where people reach this node's dashboard (http:// or https://, e.g. behind a reverse proxy). Published in the swarm's member list: the other nodes' dashboards open it on a double-click on this node. A build without the dashboard feature warns and publishes none (removing one published before).", ), option( + "stream-heartbeat", + Kind::Duration, + "DURATION", + Some("30s"), + "How often GET /stream sends a blank line while nothing changes, so proxies in front keep it open: below their read timeout (nginx's proxy_read_timeout, 60 s by default). 0: never.", + ), + option( "keepalive", Kind::Duration, "DURATION", @@ -551,6 +558,11 @@ pub(crate) struct Settings { #[serde(default = "default_keepalive", with = "crate::units::duration_option")] pub(crate) keepalive: Duration, #[serde( + default = "default_stream_heartbeat", + with = "crate::units::duration_option" + )] + pub(crate) stream_heartbeat: Duration, + #[serde( default, deserialize_with = "crate::units::optional_duration", serialize_with = "crate::units::serialize_optional_duration" @@ -664,6 +676,9 @@ fn default_document_rewrite() -> Duration { fn default_keepalive() -> Duration { Duration::from_secs(60) } +fn default_stream_heartbeat() -> Duration { + Duration::from_secs(30) +} fn default_neighbours() -> usize { 12 } |
