blob: 7bc4760916704ce270421570d0442a39d22cf2ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* Copyright (c) 2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file relay_metrics.h
* @brief Header for feature/relay/relay_metrics.c
**/
#ifndef TOR_FEATURE_RELAY_RELAY_METRICS_H
#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);
void relay_metrics_free(void);
/* Accessors. */
const smartlist_t *relay_metrics_get_stores(void);
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_METRICS_H) */
|