Skip to main content

open

Function open 

Source
pub async fn open(
    sessions: Arc<SessionRegistry>,
    params: SessionEventsParams,
) -> Result<RpcStreamItems, RpcError>
Expand description

Open one session.events stream.

Why/What: see module docs.

§Errors

crate::jsonrpc::RpcError::session_not_found, converted onto the transport’s error type, when session_id names no live session — the same refusal session_events_sse answers as a 404.

Test: events_stream_tests::session_events_replays_ring_buffer_then_live, events_stream_tests::session_events_after_seq_skips_replayed_events, events_stream_tests::session_events_unknown_session_is_refused.