Tor  0.4.7.0-alpha-dev
metrics_sys.c
Go to the documentation of this file.
1 /* Copyright (c) 2020-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * @file metrics_sys.c
6  * @brief Setup and tear down the metrics subsystem.
7  **/
8 
9 #include "lib/subsys/subsys.h"
10 
13 
14 static int
15 subsys_metrics_initialize(void)
16 {
17  metrics_init();
18  return 0;
19 }
20 
21 static void
22 subsys_metrics_shutdown(void)
23 {
25 }
26 
27 const subsys_fns_t sys_metrics = {
29 
30  .name = "metrics",
31  .supported = true,
32  .level = METRICS_SUBSYS_LEVEL,
33 
34  .initialize = subsys_metrics_initialize,
35  .shutdown = subsys_metrics_shutdown,
36 };
37 
void metrics_init(void)
Definition: metrics.c:272
void metrics_cleanup(void)
Definition: metrics.c:278
Header for feature/metrics/metrics.c.
Header for feature/metrics/metrics_sys.c.
#define METRICS_SUBSYS_LEVEL
Definition: metrics_sys.h:20
Types used to declare a subsystem.
#define SUBSYS_DECLARE_LOCATION()
Definition: subsys.h:211