skip to content
==> 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.