diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-01 22:43:18 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-01 23:14:49 -0400 |
| commit | d171a258ad2119e39cb715f8800031fff16967dc (patch) | |
| tree | 453cf4c65fa18ff98ef13d9730f1a0f74ff68540 /src/channel/app.rs | |
| parent | b8392a5fe824eff46f912a58885546e7b0f37e6f (diff) | |
Provide a resume point to bridge clients from state snapshots to the event sequence.
Diffstat (limited to 'src/channel/app.rs')
| -rw-r--r-- | src/channel/app.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel/app.rs b/src/channel/app.rs index 88f4170..d89e733 100644 --- a/src/channel/app.rs +++ b/src/channel/app.rs @@ -6,7 +6,7 @@ use crate::{ events::{broadcaster::Broadcaster, types::ChannelEvent}, repo::{ channel::{Channel, Provider as _}, - sequence::Provider as _, + sequence::{Provider as _, Sequence}, }, }; @@ -36,9 +36,9 @@ impl<'a> Channels<'a> { Ok(channel) } - pub async fn all(&self) -> Result<Vec<Channel>, InternalError> { + pub async fn all(&self, resume_point: Option<Sequence>) -> Result<Vec<Channel>, InternalError> { let mut tx = self.db.begin().await?; - let channels = tx.channels().all().await?; + let channels = tx.channels().all(resume_point).await?; tx.commit().await?; Ok(channels) |
