Function torrust_tracker::tracker::services::statistics::setup::factory
source · pub fn factory(
tracker_usage_statistics: bool
) -> (Option<Box<dyn EventSender>>, Repo)Expand description
It builds the structs needed for handling the tracker metrics.
It returns:
- An statistics
EventSenderthat allows you to send events related to statistics. - An statistics
Repowhich is an in-memory repository for the tracker metrics.
When the input argument tracker_usage_statisticsis false the setup does not run the event listeners, consequently the statistics
events are sent are received but not dispatched to the handler.