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 | ee93b522afea766f4cf0d22784cfe755f26e5a19 (patch) | |
| tree | 0dadf3cc01dfe79d161c23c5fe6f9f17e8024622 /src/remake/mod.rs | |
| parent | 396927c20677fc458334d7dcbee1c4330f91652c (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); |
