#ifndef TOR_LIB_METRICS_METRICS_STORE_ENTRY_H
#define TOR_LIB_METRICS_METRICS_STORE_ENTRY_H
#include "lib/cc/torint.h"
#include "lib/metrics/metrics_common.h"
#ifdef METRICS_STORE_ENTRY_PRIVATE
struct metrics_store_entry_t {
metrics_type_t type;
char *name;
char *help;
smartlist_t *labels;
union {
metrics_counter_t counter;
metrics_gauge_t gauge;
} u;
};
#endif
typedef struct metrics_store_entry_t metrics_store_entry_t;
metrics_store_entry_t *metrics_store_entry_new(const metrics_type_t type,
const char *name,
const char *help);
void metrics_store_entry_free_(metrics_store_entry_t *entry);
#define metrics_store_entry_free(entry) \
FREE_AND_NULL(metrics_store_entry_t, metrics_store_entry_free_, (entry));
int64_t metrics_store_entry_get_value(const metrics_store_entry_t *entry);
bool metrics_store_entry_has_label(const metrics_store_entry_t *entry,
const char *label);
void metrics_store_entry_add_label(metrics_store_entry_t *entry,
const char *label);
void metrics_store_entry_reset(metrics_store_entry_t *entry);
void metrics_store_entry_update(metrics_store_entry_t *entry,
const int64_t value);
#endif