| 100 | /// a `RoutableEvent` wrapping the first event returned by the aggregate stream. |
| 101 | #[expect(clippy::missing_panics_doc, reason = "not expected in alpha")] |
| 102 | pub async fn recv(&mut self) -> Option<RoutableEvent> { |
| 103 | let mut result_stream = self.get_aggregate_stream(); |
| 104 | // Handle first result from the stream |
| 105 | let Some(event_result) = result_stream.next().await else { |
| 106 | info!("Aggregate stream is empty, no futures to await"); |
| 107 | return None; |
| 108 | }; |
| 109 | |
| 110 | let routable_event = event_result.expect("todo: Implement logic for buffers closing. We do not expect this to happen as a part of the alpha release implementation"); |
| 111 | Some(routable_event) |
| 112 | } |
| 113 | |
| 114 | /// Handle a clock disruption event |
| 115 | /// |