Expand description
Warm pool harness.
Keeps a configurable number of pre-restored microVMs alive per StackKey,
refilled by a single background thread. The pool itself never speaks the
Firecracker HTTP API directly — every state change is delegated to a
VmProvider implementation (typically
[microvm_runtime::FirecrackerVmProvider] in production, or
microvm_runtime::InMemoryVmProvider in tests).
§Shutdown semantics
WarmPool::shutdown sets an atomic flag observed by the refill thread,
joins with a 200 ms budget, then best-effort destroys every live entry.
Mirrors the shutdown pattern used by microvm_runtime::metrics and
microvm_runtime::console. Drop calls shutdown automatically.
Structs§
- Warm
Pool - Warm pool of pre-restored microVMs.
- Warm
Pool Config - Tunables for the pool’s refill scheduler and eviction policy.
- Warm
Pool Handle - A pre-restored VM checked out of the pool, ready for the caller to bring up under a new tenant identity.
- Warm
Pool Metrics - Snapshot of counters intended for Prometheus-style scraping. Cloned cheaply
via
WarmPool::metrics; no metrics library dependency by design.
Enums§
- Validation
Result - Verdict returned by
EntryValidator::validate.
Traits§
- Entry
Validator - Per-entry health probe, run synchronously on every
WarmPool::acquireand after every successful refill spawn.