Skip to main content

create_heartbeat_stream

Function create_heartbeat_stream 

Source
pub fn create_heartbeat_stream(
    interval_secs: u64,
) -> impl Stream<Item = Result<Bytes>> + Send + 'static
Expand description

Stream heartbeat events to keep SSE connections alive

Lambda has timeout limits, so sending periodic heartbeat events can help maintain long-running SSE connections.