Expand description
Process trait and reboot types for simulation testing.
Processes represent the system under test — server nodes that can be killed and restarted (rebooted). Each process gets fresh in-memory state on every boot; persistence is only through storage.
This is separate from Workload, which
represents the test driver that survives server reboots.
§Usage
ⓘ
use moonpool_sim::{Process, SimContext, SimulationResult};
struct PaxosNode;
#[async_trait(?Send)]
impl Process for PaxosNode {
fn name(&self) -> &str { "paxos" }
async fn run(&mut self, ctx: &SimContext) -> SimulationResult<()> {
let role = ctx.topology().my_tags().get("role")
.ok_or_else(|| moonpool_sim::SimulationError::InvalidState("missing role tag".into()))?;
// Run based on assigned role from tags...
Ok(())
}
}Structs§
- Attrition
- Built-in attrition configuration for automatic process reboots.
Enums§
- Reboot
Kind - The type of reboot to perform on a process.
Traits§
- Process
- A process that participates in simulation as part of the system under test.