pub struct ScenarioStep {
pub name: String,
pub scenario: ChaosScenario,
pub duration_seconds: Option<u64>,
pub delay_before_seconds: u64,
pub continue_on_failure: bool,
}Expand description
Scenario step in an orchestration
Fields§
§name: StringStep name
scenario: ChaosScenarioScenario to execute
duration_seconds: Option<u64>Duration in seconds (0 = use scenario’s duration)
delay_before_seconds: u64Delay before starting this step (in seconds)
continue_on_failure: boolContinue on failure
Implementations§
Source§impl ScenarioStep
impl ScenarioStep
Sourcepub fn new(name: impl Into<String>, scenario: ChaosScenario) -> Self
pub fn new(name: impl Into<String>, scenario: ChaosScenario) -> Self
Create a new scenario step
Sourcepub fn with_duration(self, seconds: u64) -> Self
pub fn with_duration(self, seconds: u64) -> Self
Set duration
Sourcepub fn with_delay_before(self, seconds: u64) -> Self
pub fn with_delay_before(self, seconds: u64) -> Self
Set delay before step
Sourcepub fn continue_on_failure(self) -> Self
pub fn continue_on_failure(self) -> Self
Set continue on failure
Trait Implementations§
Source§impl Clone for ScenarioStep
impl Clone for ScenarioStep
Source§fn clone(&self) -> ScenarioStep
fn clone(&self) -> ScenarioStep
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 moreSource§impl Debug for ScenarioStep
impl Debug for ScenarioStep
Source§impl<'de> Deserialize<'de> for ScenarioStep
impl<'de> Deserialize<'de> for ScenarioStep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScenarioStep
impl RefUnwindSafe for ScenarioStep
impl Send for ScenarioStep
impl Sync for ScenarioStep
impl Unpin for ScenarioStep
impl UnwindSafe for ScenarioStep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request