feat(core): new worker workspace engine (#9257)

This commit is contained in:
EYHN
2025-01-17 00:22:18 +08:00
committed by GitHub
parent 7dc470e7ea
commit a2ffdb4047
219 changed files with 4267 additions and 7194 deletions

View File

@@ -437,14 +437,14 @@ impl DocStoragePool {
universal_id: String,
peer: String,
doc_id: String,
) -> Result<DocClock> {
) -> Result<Option<DocClock>> {
Ok(
self
.inner
.ensure_storage(universal_id)?
.get_peer_remote_clock(peer, doc_id)
.await?
.into(),
.map(Into::into),
)
}
@@ -492,14 +492,14 @@ impl DocStoragePool {
universal_id: String,
peer: String,
doc_id: String,
) -> Result<DocClock> {
) -> Result<Option<DocClock>> {
Ok(
self
.inner
.ensure_storage(universal_id)?
.get_peer_pulled_remote_clock(peer, doc_id)
.await?
.into(),
.map(Into::into),
)
}
@@ -525,6 +525,22 @@ impl DocStoragePool {
)
}
pub async fn get_peer_pushed_clock(
&self,
universal_id: String,
peer: String,
doc_id: String,
) -> Result<Option<DocClock>> {
Ok(
self
.inner
.ensure_storage(universal_id)?
.get_peer_pushed_clock(peer, doc_id)
.await?
.map(Into::into),
)
}
pub async fn get_peer_pushed_clocks(
&self,
universal_id: String,