Tor  0.4.6.0-alpha-dev
metrics_sys.c
Go to the documentation of this file.
1 /* Copyright (c) 2020, 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 
SUBSYS_DECLARE_LOCATION
#define SUBSYS_DECLARE_LOCATION()
Definition: subsys.h:211
METRICS_SUBSYS_LEVEL
#define METRICS_SUBSYS_LEVEL
Definition: metrics_sys.h:20
subsys.h
Types used to declare a subsystem.
metrics_cleanup
void metrics_cleanup(void)
Definition: metrics.c:254
metrics_sys.h
Header for feature/metrics/metrics_sys.c.
metrics.h
Header for feature/metrics/metrics.c.
metrics_init
void metrics_init(void)
Definition: metrics.c:248
subsys_fns_t
Definition: subsys.h:38