aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/relay_metrics.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-04-15 12:46:23 -0400
committerDavid Goulet <dgoulet@torproject.org>2021-05-12 11:58:25 -0400
commitbdde4579c2fcb43cf5a32d617b3a5fe72314adf8 (patch)
treec74057bf3bc85adcafdbde2cdc6dc1cc10fac63b /src/feature/relay/relay_metrics.h
parent0cf25fd3a5c0f8d99984bcfa685dd1ca577953e2 (diff)
downloadtor-bdde4579c2fcb43cf5a32d617b3a5fe72314adf8.tar.gz
tor-bdde4579c2fcb43cf5a32d617b3a5fe72314adf8.zip
relay: Code and objects to initialize metrics store
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/relay/relay_metrics.h')
-rw-r--r--src/feature/relay/relay_metrics.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/feature/relay/relay_metrics.h b/src/feature/relay/relay_metrics.h
index 3a13eb2042..7bc4760916 100644
--- a/src/feature/relay/relay_metrics.h
+++ b/src/feature/relay/relay_metrics.h
@@ -10,6 +10,30 @@
#define TOR_FEATURE_RELAY_RELAY_METRICS_H
#include "lib/container/smartlist.h"
+#include "lib/metrics/metrics_common.h"
+
+#ifdef RELAY_METRICS_ENTRY_PRIVATE
+
+/** Metrics key for each reported metrics. This key is also used as an index in
+ * the base_metrics array. */
+typedef enum {
+ /* XXX So code compiles. */
+ PLACEHOLDER = 0,
+} relay_metrics_key_t;
+
+/** The metadata of a relay metric. */
+typedef struct relay_metrics_entry_t {
+ /* Metric key used as a static array index. */
+ relay_metrics_key_t key;
+ /* Metric type. */
+ metrics_type_t type;
+ /* Metrics output name. */
+ const char *name;
+ /* Metrics output help comment. */
+ const char *help;
+} relay_metrics_entry_t;
+
+#endif /* RELAY_METRICS_ENTRY_PRIVATE */
/* Init. */
void relay_metrics_init(void);