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 b5d9ad8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,24 @@ use crate::CurrentClock;
pub struct Tracker {
// 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 b5d9ad8

Please sign in to comment.