aboutsummaryrefslogtreecommitdiffstats
path: root/docs/architecture.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 01:12:18 +0000
committertv <tv@krebsco.de>2026-11-29 01:12:18 +0000
commitf10ee79ddc2b0a541f1011aa395990df21e456b5 (patch)
treec88be3f95cbec1d5413c2b1aa5c3c9ff7135b6f3 /docs/architecture.md
parent7a8e8ecd650ddb253c08445f6f60686e1c8b8bf5 (diff)
config: files, arguments and layers, by a program's own options
What reads a configuration moves to the crate config, as it was, so that other programs read theirs alike: * option: Kind, OptionSpec, and Schema: a program's options, those that can't be combined, and those that are gone; * file: TOML and JSON files, their includes and unsets; * arguments: the options as arguments, --config and --unset, and files and arguments put together (merged); * layer: values and where they came from, a later source over the earlier ones (overlay), what a value was made of (Sources); * units: durations and sizes as operators write them, which continuum keeps under crate::units. Each takes the schema it reads by, where continuum's code went by its own tables: the node's is config::SCHEMA, a party's client's config::PARTY. Whether a value is shown goes by the schema read by, so an option of the node is no secret for being one of the client's. continuum keeps its options, the settings they make, their checks and the report; its tests of files and layers stay, by the node's options, and the crate has one by a schema of its own.
Diffstat (limited to 'docs/architecture.md')
-rw-r--r--docs/architecture.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index 69b0cc3..6827387 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -305,7 +305,7 @@ Roughly by size and by how many rules interact there:
| [`swarm/peer/`](../src/swarm/peer/) + [`sync.rs`](../src/swarm/sync.rs) + [`source.rs`](../src/swarm/source.rs) | 2,300 | The protocol state machine: handshake, liveness, sync sessions with deadlines, who syncs with whom while catching up. Timing-dependent; tested on the simulated network ([`simtest/`](../src/simtest/)). |
| [`state/`](../src/state/) | 1,600 | `AppState` and its write helpers ([`mod.rs`](../src/state/mod.rs)), `PeerState` ([`peer.rs`](../src/state/peer.rs)), `Timing`, reads ([`read.rs`](../src/state/read.rs)) and the `Host` impl ([`host.rs`](../src/state/host.rs)). A hub, not a layer. |
| [`transport/`](../src/transport/) | 11,500 | libp2p ([`libp2p/`](../src/transport/libp2p/), 4,400: addresses, relays, hole punching, which paths to keep), the paths and identity layers (2,300: measuring, failing over, proving node IDs), Mycelium and its daemon ([`mycelium/`](../src/transport/mycelium/), 1,200), Tor (700), the wire format ([`wire.rs`](../src/transport/wire.rs), derived), the simulator. The transports are self-contained behind the `Transport` trait; libp2p's choice of addresses is the subtle part. |
-| [`config/`](../src/config/), [`crates/config/`](../crates/config/) | 3,300, 500 | Layered sources, conflicts, the report; importers and placeholders, in a crate of their own (`config`), which other programs use too. Self-contained. |
+| [`config/`](../src/config/), [`crates/config/`](../crates/config/) | 2,600, 2,300 | The options, the settings they make, their checks and the report; and, in a crate of their own (`config`), which other programs use too, what reads them: files and their includes, arguments, layers and what each value came from, conflicts, importers and placeholders. Self-contained. |
| [`document/store.rs`](../src/document/store.rs) | 1,200 | Conflict-aware JSON over Automerge. Subtle (merged maps, canonical writes), well covered by the rest relying on it. |
| [`swarm/topology/`](../src/swarm/topology/), [`blob.rs`](../src/swarm/blob.rs) | 1,500 | Pure algorithms with tests; the topology hashes each member once, then scores the N² pairs by cheap mixing. |
| [`api/`](../src/api/) | 3,600 | Handlers; the Prometheus rendering is the longest file. The dashboard's page ([`dashboard.html`](../src/api/dashboard/dashboard.html), 2,000 more) is one file of HTML, CSS and script. |