master
h 27 lines 905 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_RRDSET_INDEX_NAME_H
4 #define NETDATA_RRDSET_INDEX_NAME_H
5
6 #include "rrdset.h"
7 #include "rrd.h"
8
9 void rrdset_index_byname_init(RRDHOST *host);
10
11 void rrdset_index_add_name(RRDHOST *host, RRDSET *st);
12 void rrdset_index_del_name(RRDHOST *host, RRDSET *st);
13
14 extern RRDHOST *localhost;
15 RRDSET *rrdset_find_byname(RRDHOST *host, const char *name);
16 #define rrdset_find_byname_localhost(name) rrdset_find_byname(localhost, name)
17
18 /* This will not return charts that are archived */
19 static inline RRDSET *rrdset_find_active_byname_localhost(const char *name) {
20 RRDSET *st = rrdset_find_byname_localhost(name);
21 return st;
22 }
23
24 int rrdset_reset_name(RRDSET *st, const char *name);
25 STRING *rrdset_fix_name(RRDHOST *host, const char *chart_full_id, const char *type, const char *current_name, const char *name);
26
27 #endif //NETDATA_RRDSET_INDEX_NAME_H