diff options
author | David Goulet <dgoulet@torproject.org> | 2020-10-19 15:50:45 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-10-27 10:43:42 -0400 |
commit | a882d1bf0abbbcf2bc4f8c039f9b82262462292c (patch) | |
tree | c37c263e44ba53924929062f473c913e2124dd93 /src/lib/subsys | |
parent | ec731290a5a790093961f0fdb06cf69000194adf (diff) | |
download | tor-a882d1bf0abbbcf2bc4f8c039f9b82262462292c.tar.gz tor-a882d1bf0abbbcf2bc4f8c039f9b82262462292c.zip |
metrics: New feature module to track tor metrics
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/lib/subsys')
-rw-r--r-- | src/lib/subsys/subsys.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/subsys/subsys.h b/src/lib/subsys/subsys.h index 62c0de026d..4cff5f0b6e 100644 --- a/src/lib/subsys/subsys.h +++ b/src/lib/subsys/subsys.h @@ -15,6 +15,7 @@ struct pubsub_connector_t; struct config_format_t; +struct smartlist_t; /** * A subsystem is a part of Tor that is initialized, shut down, configured, @@ -190,6 +191,17 @@ typedef struct subsys_fns_t { * to disk. **/ int (*flush_state)(void *); + + /** + * Return a list of metrics store of this subsystem. This is called + * everytime a request arrives on the MetricsPort. + * + * The list MUST contain metrics_store_t object and contains entries so it + * can be formatted for the metrics port. + * + * This can return NULL or be NULL. + **/ + const struct smartlist_t *(*get_metrics)(void); } subsys_fns_t; #ifndef COCCI |