pub struct RulepackServiceSimulator { /* private fields */ }Expand description
Rulepack Service Simulator implementation
Implementations§
Source§impl RulepackServiceSimulator
impl RulepackServiceSimulator
Sourcepub fn new(config: RulepackServiceConfig) -> Self
pub fn new(config: RulepackServiceConfig) -> Self
Create a new Rulepack Service Simulator
Sourcepub async fn run(&self, shutdown_rx: Receiver<()>) -> SimulatorResult<()>
pub async fn run(&self, shutdown_rx: Receiver<()>) -> SimulatorResult<()>
Run the simulator HTTP server
Sourcepub async fn get_rulepack(&self, version: &str) -> Option<RulepackConfig>
pub async fn get_rulepack(&self, version: &str) -> Option<RulepackConfig>
Get a specific rulepack version
Trait Implementations§
Source§impl Simulator for RulepackServiceSimulator
impl Simulator for RulepackServiceSimulator
Source§fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get health status
Source§fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SimulatorStats> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SimulatorStats> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get statistics
Source§fn reset_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reset_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reset statistics
Auto Trait Implementations§
impl Freeze for RulepackServiceSimulator
impl !RefUnwindSafe for RulepackServiceSimulator
impl Send for RulepackServiceSimulator
impl Sync for RulepackServiceSimulator
impl Unpin for RulepackServiceSimulator
impl UnsafeUnpin for RulepackServiceSimulator
impl !UnwindSafe for RulepackServiceSimulator
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