1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pub mod statistics;
pub mod torrent;
use std::sync::Arc;
use torrust_tracker_configuration::Configuration;
use crate::tracker::Tracker;
#[must_use]
pub fn tracker_factory(config: Arc<Configuration>) -> Tracker {
let (stats_event_sender, stats_repository) = statistics::setup::factory(config.tracker_usage_statistics);
match Tracker::new(config, stats_event_sender, stats_repository) {
Ok(tracker) => tracker,
Err(error) => {
panic!("{}", error)
}
}
}