forked from torrust/torrust-tracker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontainer.rs
22 lines (19 loc) · 856 Bytes
/
container.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::sync::Arc;
use tokio::sync::RwLock;
use crate::core::authentication::handler::KeysHandler;
use crate::core::authentication::service::AuthenticationService;
use crate::core::statistics::event::sender::Sender;
use crate::core::statistics::repository::Repository;
use crate::core::whitelist::manager::WhiteListManager;
use crate::core::{whitelist, Tracker};
use crate::servers::udp::server::banning::BanService;
pub struct AppContainer {
pub tracker: Arc<Tracker>,
pub keys_handler: Arc<KeysHandler>,
pub authentication_service: Arc<AuthenticationService>,
pub whitelist_authorization: Arc<whitelist::authorization::Authorization>,
pub ban_service: Arc<RwLock<BanService>>,
pub stats_event_sender: Arc<Option<Box<dyn Sender>>>,
pub stats_repository: Arc<Repository>,
pub whitelist_manager: Arc<WhiteListManager>,
}