Tor  0.4.6.0-alpha-dev
metrics_store.h
Go to the documentation of this file.
1 /* Copyright (c) 2020, 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);
31 
32 /* Accessors. */
34  const char *name);
36  const metrics_store_t *store, buf_t *data);
37 
38 #ifdef METRICS_METRICS_STORE_PRIVATE
39 
40 #endif /* METRICS_METRICS_STORE_PRIVATE. */
41 
42 #endif /* !defined(TOR_LIB_METRICS_METRICS_STORE_H) */
name
const char * name
Definition: config.c:2464
metrics_store_t
Definition: metrics_store.c:25
smartlist.h
Header for smartlist.c.
metrics_store_free_
void metrics_store_free_(metrics_store_t *store)
Definition: metrics_store.c:79
metrics_common.h
Header for lib/metrics/metrics_common.c.
metrics_store_new
metrics_store_t * metrics_store_new(void)
Definition: metrics_store.c:68
metrics_type_t
metrics_type_t
Definition: metrics_common.h:26
metrics_store_add
metrics_store_entry_t * metrics_store_add(metrics_store_t *store, metrics_type_t type, const char *name, const char *help)
Definition: metrics_store.c:103
buffers.h
Header file for buffers.c.
metrics_store_entry.h
Header for lib/metrics/metrics_store_entry.c.
metrics_store_get_output
void metrics_store_get_output(const metrics_format_t fmt, const metrics_store_t *store, buf_t *data)
Definition: metrics_store.c:126
metrics_store_get_all
smartlist_t * metrics_store_get_all(const metrics_store_t *store, const char *name)
Definition: metrics_store.c:92
metrics_format_t
metrics_format_t
Definition: metrics_common.h:20
smartlist_t
Definition: smartlist_core.h:26