Merge branch 'maint-0.4.8' into release-0.4.8
[tor.git] / src / feature / metrics / metrics.h
blob33e15f8bc963b4671e570b929dc8efe451ef2863
1 /* Copyright (c) 2020-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * @file metrics.h
6 * @brief Header for feature/metrics/metrics.c
7 **/
9 #ifndef TOR_FEATURE_METRICS_METRICS_H
10 #define TOR_FEATURE_METRICS_METRICS_H
12 #include "lib/buf/buffers.h"
13 #include "lib/container/smartlist.h"
15 #include "app/config/or_options_st.h"
17 #include "lib/metrics/metrics_common.h"
19 struct connection_t;
21 /* Initializer / Cleanup. */
22 void metrics_init(void);
23 void metrics_cleanup(void);
25 /* Accessors. */
26 buf_t *metrics_get_output(const metrics_format_t fmt);
28 /* Connection. */
29 int metrics_connection_process_inbuf(struct connection_t *conn);
30 int metrics_connection_reached_eof(struct connection_t *conn);
31 int metrics_connection_finished_flushing(struct connection_t *conn);
33 /* Configuration. */
34 int metrics_parse_ports(or_options_t *options, smartlist_t *ports,
35 char **err_msg_out);
37 #endif /* !defined(TOR_FEATURE_METRICS_METRICS_H) */