skip to content
[readonly]

What a fleet member keeps on disk: its term, its vote, and the accepted and committed documents, as the Rust's state file text

sh
$ sexc add @ajax/mesh-fleet-persist
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:08v/# 1 version
  • drwxr-xr-x-Oct 27 04:08files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:08 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0, @ajax/mesh-parse ^0.1.0, @ajax/rust-fmt ^0.1.0, @ajax/mesh-fleet-doc ^0.1.0
dependents
@ajax/mesh-fleet-core, @ajax/mesh-fleet-store, @ajax/mesh-peer-relay
keywords
mesh alphaos fleet fleet persist raft
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-fleet-persist
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-fleet-persist
2
3What a fleet member keeps on disk (`mfp_persist`): its term, its vote in that term, the last document
4it accepted from a leader and the last it knows committed. `mfp_encode` / `mfp_decode` are the Rust's
5state file text (`systems N`, `term`, `voted`, then each document prefixed by its length); a file
6written for another cluster size is refused. Writing it safely (temp, fsync, rename, directory fsync)
7is `@ajax/mesh-fleet-store`.
8
9## Ported from
10
11[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/fleet.rs`:
12`Persist` (`encode`, `decode`).
13
14## Tests
15
16`tests/persist.c`: the Persist part of the Rust's `document_round_trips`, and each error.
17
18## Licence
19
20MIT. See the repository's LICENSE.