pub struct ChaosScenario {
pub name: String,
pub faults: Vec<(FaultType, Duration)>,
pub duration: Duration,
}Expand description
Scenario for chaos testing
Fields§
§name: String§faults: Vec<(FaultType, Duration)>§duration: DurationImplementations§
Source§impl ChaosScenario
impl ChaosScenario
Sourcepub fn with_fault(self, fault: FaultType, at: Duration) -> Self
pub fn with_fault(self, fault: FaultType, at: Duration) -> Self
Add a fault at a specific time offset
Sourcepub fn with_duration(self, duration: Duration) -> Self
pub fn with_duration(self, duration: Duration) -> Self
Set scenario duration
Sourcepub fn leader_election() -> Self
pub fn leader_election() -> Self
Leader election scenario
Sourcepub fn network_partition() -> Self
pub fn network_partition() -> Self
Network partition scenario
Sourcepub fn disk_failure() -> Self
pub fn disk_failure() -> Self
Disk failure scenario
Sourcepub fn clock_skew() -> Self
pub fn clock_skew() -> Self
Clock skew scenario
Trait Implementations§
Source§impl Clone for ChaosScenario
impl Clone for ChaosScenario
Source§fn clone(&self) -> ChaosScenario
fn clone(&self) -> ChaosScenario
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChaosScenario
impl RefUnwindSafe for ChaosScenario
impl Send for ChaosScenario
impl Sync for ChaosScenario
impl Unpin for ChaosScenario
impl UnwindSafe for ChaosScenario
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more