diff options
| author | tv <tv@krebsco.de> | 2026-10-24 18:18:29 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-24 18:18:29 +0200 |
| commit | 09f2dfd083c4fcdce4c5ca7376353906eb025c42 (patch) | |
| tree | e13141f10e3854408bd70d18d1bf31581abe5458 /src/remake/mod.rs | |
| parent | 371e52cb48bae99232547f6fae6a0487a85c2d04 (diff) | |
put remake content into blobs
Diffstat (limited to 'src/remake/mod.rs')
| -rw-r--r-- | src/remake/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/remake/mod.rs b/src/remake/mod.rs index 1c2be36..dacd1db 100644 --- a/src/remake/mod.rs +++ b/src/remake/mod.rs @@ -7,6 +7,7 @@ //! * `records`: the replicated remake records under `_continuum/remakes/<id>`. //! * `coordinator`: proposal, vote count and decision on the node that was asked. //! * `vote`: who votes, for which remake, and when a remake has its majority. +//! * `content`: the new document of a `replace`/`import` remake, fetched by every voter. //! * `switch`: switching this node to a committed epoch (worker). //! * `catchup`: rejoining a newer epoch from peers (late, new or failed nodes), then //! replaying or quarantining this node's own missing changes. @@ -20,6 +21,7 @@ mod api; mod catchup; +mod content; mod coordinator; mod delta; mod kind; @@ -75,6 +77,11 @@ pub(crate) trait Host: Clone + Send + Sync + 'static { hash: automerge::ChangeHash, ) -> impl Future<Output = anyhow::Result<automerge::Change>> + Send; + /// Downloads content by its BLAKE3 hash from peers on the local epoch, checked + /// against it. + fn fetch_content(&self, hash: [u8; 32]) + -> impl Future<Output = anyhow::Result<Vec<u8>>> + Send; + /// Starts sync with every peer (e.g. after holding it back). fn request_sync(&self); |
