Tor  0.4.7.0-alpha-dev
metrics_store.h
Go to the documentation of this file.
1 /* Copyright (c) 2020-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * @file metrics_store.h
6  * @brief Header for lib/metrics/metrics_store.c
7  **/
8 
9 #ifndef TOR_LIB_METRICS_METRICS_STORE_H
10 #define TOR_LIB_METRICS_METRICS_STORE_H
11 
12 #include "lib/buf/buffers.h"
14 
17 
18 /* Stub. */
19 typedef struct metrics_store_t metrics_store_t;
20 
21 /* Allocators. */
23 #define metrics_store_free(store) \
24  FREE_AND_NULL(metrics_store_t, metrics_store_free_, (store))
26 
27 /* Modifiers. */
28 metrics_store_entry_t *metrics_store_add(metrics_store_t *store,
29  metrics_type_t type,
30  const char *name, const char *help);
32 
33 /* Accessors. */
35  const char *name);
37  const metrics_store_t *store, buf_t *data);
38 
39 #ifdef METRICS_METRICS_STORE_PRIVATE
40 
41 #endif /* METRICS_METRICS_STORE_PRIVATE. */
42 
43 #endif /* !defined(TOR_LIB_METRICS_METRICS_STORE_H) */
Header file for buffers.c.
const char * name
Definition: config.c:2434
Header for lib/metrics/metrics_common.c.
metrics_type_t
metrics_format_t
void metrics_store_free_(metrics_store_t *store)
Definition: metrics_store.c:85
smartlist_t * metrics_store_get_all(const metrics_store_t *store, const char *name)
Definition: metrics_store.c:98
metrics_store_entry_t * metrics_store_add(metrics_store_t *store, metrics_type_t type, const char *name, const char *help)
void metrics_store_get_output(const metrics_format_t fmt, const metrics_store_t *store, buf_t *data)
metrics_store_t * metrics_store_new(void)
Definition: metrics_store.c:74
void metrics_store_reset(metrics_store_t *store)
Header for lib/metrics/metrics_store_entry.c.
Header for smartlist.c.