Skip to content

Commit

Permalink
docs: add commments to core::Tracker struct fields
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Jul 1, 2024
1 parent 5a16ea1 commit f61c7c3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,26 @@ use crate::CurrentClock;
/// > Typically, the `Tracker` is used by a higher application service that handles
/// > the network layer.
pub struct Tracker {
// The tracker configuration.
/// The tracker configuration.
config: Core,

/// A database driver implementation: [`Sqlite3`](crate::core::databases::sqlite)
/// or [`MySQL`](crate::core::databases::mysql)
database: Arc<Box<dyn Database>>,

/// Tracker users' keys. Only for private trackers.
keys: tokio::sync::RwLock<std::collections::HashMap<Key, auth::ExpiringKey>>,

/// The list of allowed torrents. Only for listed trackers.
whitelist: tokio::sync::RwLock<std::collections::HashSet<InfoHash>>,

/// The in-memory torrents repository.
torrents: Arc<Torrents>,

/// Service to send stats events.
stats_event_sender: Option<Box<dyn statistics::EventSender>>,

/// The in-memory stats repo.
stats_repository: statistics::Repo,
}

Expand Down

0 comments on commit f61c7c3

Please sign in to comment.