Skip to main content

Module engine

Module engine 

Source
Expand description

PeerSelector — the public engine (SPEC.md §5): the closed select → record_outcome → rebalance decision + learning loop over the registry (§2), the measured-only quality model (§3), and the autonomous scorer (§4).

The selector is pure + in-memory: select/rebalance never block on I/O, and record_outcome folds a measured result into the models in real time so the next decision is smarter (SPEC §5). Interior mutability (std::sync::Mutex) lets the hooks take &self (SPEC §5.1) while the engine mutates the registry + learned models.

Structs§

PeerSelector
The self-optimizing peer selector (SPEC §5, §11). Construct with PeerSelector::new, feed it registry churn + DHT candidates, ask it to select a source subset, and stream every measured outcome back via record_outcome.