Skip to content

Commit f33665d

Browse files
committed
refactor: [torrust#1228] start using the udp tracker stats
Parallel change, step 2: 1. [x] Start using HTTP Tracker Core Stats 2. [x] Start using UDP Tracker Core Stats 3. [ ] Get metrics from HTTP and UDP Tracker Core Stats 4. [ ] Remove deprecate unified HTTP and UDP stats.
1 parent 5f08b2e commit f33665d

File tree

5 files changed

+332
-55
lines changed

5 files changed

+332
-55
lines changed

src/container.rs

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub struct UdpTrackerContainer {
4646
pub scrape_handler: Arc<ScrapeHandler>,
4747
pub whitelist_authorization: Arc<whitelist::authorization::WhitelistAuthorization>,
4848
pub stats_event_sender: Arc<Option<Box<dyn Sender>>>,
49+
pub udp_stats_event_sender: Arc<Option<Box<dyn udp_tracker_core::statistics::event::sender::Sender>>>,
4950
pub ban_service: Arc<RwLock<BanService>>,
5051
}
5152

@@ -59,6 +60,7 @@ impl UdpTrackerContainer {
5960
scrape_handler: app_container.scrape_handler.clone(),
6061
whitelist_authorization: app_container.whitelist_authorization.clone(),
6162
stats_event_sender: app_container.stats_event_sender.clone(),
63+
udp_stats_event_sender: app_container.udp_stats_event_sender.clone(),
6264
ban_service: app_container.ban_service.clone(),
6365
}
6466
}

0 commit comments

Comments
 (0)