(
&self,
payload: GuildSpecifier,
)
| 116 | } |
| 117 | |
| 118 | async fn stream_guild_logs( |
| 119 | &self, |
| 120 | payload: GuildSpecifier, |
| 121 | ) -> Result<service::SseStream<guild_logger::LogEntry>, StatusCode> { |
| 122 | let guild_id = payload.guild_id; |
| 123 | |
| 124 | let mut rx = self.log_subscriber.subscribe(guild_id); |
| 125 | let out = async_stream::try_stream! { |
| 126 | while let Ok(next) = rx.recv().await{ |
| 127 | yield next; |
| 128 | } |
| 129 | }; |
| 130 | |
| 131 | Ok(SseStream::new(out)) |
| 132 | } |
| 133 | } |
no test coverage detected