Skip to main content

Mountain/Environment/TestProvider/
TestProviderState.rs

1
2//! Aggregate state for the TestProvider: registered controllers and
3//! currently active test runs. Held inside `ApplicationState` behind a
4//! `tokio::sync::RwLock` for concurrent reads during test runs.
5
6use std::collections::HashMap;
7
8use crate::Environment::TestProvider::{TestControllerState, TestRun};
9
10#[derive(Debug)]
11pub struct Struct {
12	pub Controllers:HashMap<String, TestControllerState::Struct>,
13
14	pub ActiveRuns:HashMap<String, TestRun::Struct>,
15}
16
17impl Struct {
18	pub fn new() -> Self { Self { Controllers:HashMap::new(), ActiveRuns:HashMap::new() } }
19}
20
21impl Default for Struct {
22	fn default() -> Self { Self::new() }
23}