1
1
use std:: sync:: Arc ;
2
2
3
3
use bittorrent_http_tracker_core:: container:: HttpTrackerCoreContainer ;
4
- use bittorrent_tracker_core:: authentication:: handler:: KeysHandler ;
5
4
use bittorrent_tracker_core:: container:: TrackerCoreContainer ;
6
- use bittorrent_tracker_core:: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
7
- use bittorrent_tracker_core:: whitelist:: manager:: WhitelistManager ;
8
5
use bittorrent_udp_tracker_core:: container:: UdpTrackerCoreContainer ;
9
6
use bittorrent_udp_tracker_core:: services:: banning:: BanService ;
10
7
use bittorrent_udp_tracker_core:: { self } ;
@@ -13,22 +10,11 @@ use torrust_tracker_configuration::{Core, HttpApi, HttpTracker, UdpTracker};
13
10
use torrust_udp_tracker_server:: container:: UdpTrackerServerContainer ;
14
11
15
12
pub struct TrackerHttpApiCoreContainer {
16
- // todo: replace with TrackerCoreContainer
17
- pub core_config : Arc < Core > ,
18
- pub in_memory_torrent_repository : Arc < InMemoryTorrentRepository > ,
19
- pub keys_handler : Arc < KeysHandler > ,
20
- pub whitelist_manager : Arc < WhitelistManager > ,
21
-
22
- // todo: replace with HttpTrackerCoreContainer
13
+ pub tracker_core_container : Arc < TrackerCoreContainer > ,
23
14
pub http_stats_repository : Arc < bittorrent_http_tracker_core:: statistics:: repository:: Repository > ,
24
-
25
- // todo: replace with UdpTrackerCoreContainer
26
15
pub ban_service : Arc < RwLock < BanService > > ,
27
16
pub udp_core_stats_repository : Arc < bittorrent_udp_tracker_core:: statistics:: repository:: Repository > ,
28
-
29
- // todo: replace with UdpTrackerServerContainer
30
17
pub udp_server_stats_repository : Arc < torrust_udp_tracker_server:: statistics:: repository:: Repository > ,
31
-
32
18
pub http_api_config : Arc < HttpApi > ,
33
19
}
34
20
@@ -63,10 +49,7 @@ impl TrackerHttpApiCoreContainer {
63
49
http_api_config : & Arc < HttpApi > ,
64
50
) -> Arc < TrackerHttpApiCoreContainer > {
65
51
Arc :: new ( TrackerHttpApiCoreContainer {
66
- core_config : tracker_core_container. core_config . clone ( ) ,
67
- in_memory_torrent_repository : tracker_core_container. in_memory_torrent_repository . clone ( ) ,
68
- keys_handler : tracker_core_container. keys_handler . clone ( ) ,
69
- whitelist_manager : tracker_core_container. whitelist_manager . clone ( ) ,
52
+ tracker_core_container : tracker_core_container. clone ( ) ,
70
53
71
54
http_stats_repository : http_tracker_core_container. http_stats_repository . clone ( ) ,
72
55
0 commit comments