Module chaos

Module chaos 

Source
Expand description

Chaos Engineering Configuration

Infrastructure for chaos engineering and fault injection testing, ported from renacer v0.4.1.

§Examples

use aprender::chaos::ChaosConfig;
use std::time::Duration;

// Use presets
let gentle = ChaosConfig::gentle();
let aggressive = ChaosConfig::aggressive();

// Custom configuration
let custom = ChaosConfig::new()
    .with_memory_limit(100 * 1024 * 1024)
    .with_cpu_limit(0.5)
    .with_timeout(Duration::from_secs(30))
    .with_signal_injection(true)
    .build();

assert_eq!(custom.memory_limit, 100 * 1024 * 1024);
assert_eq!(custom.cpu_limit, 0.5);

Structs§

ChaosConfig
Chaos engineering configuration for fault injection testing.

Enums§

ChaosError
Errors that can occur during chaos engineering tests.

Type Aliases§

ChaosResult
Result type for chaos operations.