pub struct ScenarioEngine { /* private fields */ }Expand description
Scenario engine for managing active chaos scenarios
Implementations§
Source§impl ScenarioEngine
impl ScenarioEngine
Sourcepub fn start_scenario(&self, scenario: ChaosScenario)
pub fn start_scenario(&self, scenario: ChaosScenario)
Start a scenario
Sourcepub fn stop_scenario(&self, name: &str) -> bool
pub fn stop_scenario(&self, name: &str) -> bool
Stop a scenario by name
Sourcepub fn stop_all_scenarios(&self)
pub fn stop_all_scenarios(&self)
Stop all scenarios
Sourcepub fn get_active_scenarios(&self) -> Vec<ChaosScenario>
pub fn get_active_scenarios(&self) -> Vec<ChaosScenario>
Get active scenarios
Sourcepub fn get_scenario(&self, name: &str) -> Option<ChaosScenario>
pub fn get_scenario(&self, name: &str) -> Option<ChaosScenario>
Get a specific scenario
Sourcepub fn get_merged_config(&self) -> Option<ChaosConfig>
pub fn get_merged_config(&self) -> Option<ChaosConfig>
Get merged chaos config from all active scenarios
Sourcepub fn cleanup_expired(&self)
pub fn cleanup_expired(&self)
Clean up expired scenarios
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScenarioEngine
impl !RefUnwindSafe for ScenarioEngine
impl Send for ScenarioEngine
impl Sync for ScenarioEngine
impl Unpin for ScenarioEngine
impl !UnwindSafe for ScenarioEngine
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> 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