pub struct MappingServiceSimulator { /* private fields */ }Expand description
Mapping Service Simulator implementation
Implementations§
Source§impl MappingServiceSimulator
impl MappingServiceSimulator
Sourcepub fn new(config: MappingServiceConfig) -> Self
pub fn new(config: MappingServiceConfig) -> Self
Create a new Mapping 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_mapping(&self, version: &str) -> Option<MappingConfig>
pub async fn get_mapping(&self, version: &str) -> Option<MappingConfig>
Get a specific mapping version
Sourcepub async fn add_mapping(&self, mapping: MappingConfig)
pub async fn add_mapping(&self, mapping: MappingConfig)
Add a custom mapping (for testing)
Trait Implementations§
Source§impl Simulator for MappingServiceSimulator
impl Simulator for MappingServiceSimulator
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 MappingServiceSimulator
impl !RefUnwindSafe for MappingServiceSimulator
impl Send for MappingServiceSimulator
impl Sync for MappingServiceSimulator
impl Unpin for MappingServiceSimulator
impl UnsafeUnpin for MappingServiceSimulator
impl !UnwindSafe for MappingServiceSimulator
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