skip to content
==> README.md <==
1# @ajax/mesh-fleet-doc
2
3The fleet's desired state (`mfd_doc`): the programs that should be loaded (catalog dir, image hash, run
4state, reset generation, the previous image for a rollback, the scheduling needs, the scheduler's
5placement, a migration in flight, the operator's pin, why it is where it is), the lockstep groups
6(program, ordered members, epoch, cycle, state, on-loss policy), the placement requests and the
7scheduler's switches (paused, autoreform, cordon). `mfd_encode` / `mfd_decode` are the Rust's text
8document, one line per item, byte for byte; the leader sends it whole.
9
10Programs and placement requests are kept sorted by name (the Rust's `BTreeMap` order); groups keep
11their order.
12
13## Ported from
14
15[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/fleet.rs`:
16`ProgSpec` (`here`), `CycleOp`, `GroupState`, `OnLoss`, `Group` (`mask`, `rank`, `order`), `Doc`
17(`id`, `group_of`, `encode`, `decode`), `can_run`.
18
19## Tests
20
21`tests/doc.c`: the document part of the Rust's `document_round_trips` (with every scheduler field),
22the exact text, decode errors in the Rust's words and order, ranks, `here`, `can_run`.
23
24## Licence
25
26MIT. See the repository's LICENSE.