summaryrefslogtreecommitdiffstats
path: root/database/rrdsetvar.h
diff options
context:
space:
mode:
Diffstat (limited to 'database/rrdsetvar.h')
-rw-r--r--database/rrdsetvar.h36
1 files changed, 11 insertions, 25 deletions
diff --git a/database/rrdsetvar.h b/database/rrdsetvar.h
index 37f4da959..0c2e66712 100644
--- a/database/rrdsetvar.h
+++ b/database/rrdsetvar.h
@@ -11,34 +11,20 @@
// This means, there will be no speed penalty for using
// these variables
-struct rrdsetvar {
- char *variable; // variable name
- uint32_t hash; // variable name hash
+void rrdsetvar_index_init(RRDSET *st);
+void rrdsetvar_index_destroy(RRDSET *st);
+void rrdsetvar_release_and_delete_all(RRDSET *st);
- char *key_fullid; // chart type.chart id.variable
- char *key_fullname; // chart type.chart name.variable
+#define rrdsetvar_custom_chart_variable_release(st, rsa) rrdsetvar_release((st)->rrdsetvar_root_index, rsa)
+void rrdsetvar_release(DICTIONARY *dict, const RRDSETVAR_ACQUIRED *rsa);
- RRDVAR_TYPE type;
- void *value;
+const RRDSETVAR_ACQUIRED *rrdsetvar_custom_chart_variable_add_and_acquire(RRDSET *st, const char *name);
+void rrdsetvar_custom_chart_variable_set(RRDSET *st, const RRDSETVAR_ACQUIRED *rsa, NETDATA_DOUBLE value);
- RRDVAR_OPTIONS options;
+void rrdsetvar_rename_all(RRDSET *st);
+const RRDSETVAR_ACQUIRED *rrdsetvar_add_and_acquire(RRDSET *st, const char *name, RRDVAR_TYPE type, void *value, RRDVAR_FLAGS flags);
+void rrdsetvar_add_and_leave_released(RRDSET *st, const char *name, RRDVAR_TYPE type, void *value, RRDVAR_FLAGS flags);
- RRDVAR *var_local;
- RRDVAR *var_family;
- RRDVAR *var_host;
- RRDVAR *var_family_name;
- RRDVAR *var_host_name;
-
- struct rrdset *rrdset;
-
- struct rrdsetvar *next;
-};
-
-extern RRDSETVAR *rrdsetvar_custom_chart_variable_create(RRDSET *st, const char *name);
-extern void rrdsetvar_custom_chart_variable_set(RRDSETVAR *rv, NETDATA_DOUBLE value);
-
-extern void rrdsetvar_rename_all(RRDSET *st);
-extern RRDSETVAR *rrdsetvar_create(RRDSET *st, const char *variable, RRDVAR_TYPE type, void *value, RRDVAR_OPTIONS options);
-extern void rrdsetvar_free(RRDSETVAR *rs);
+void rrdsetvar_print_to_streaming_custom_chart_variables(RRDSET *st, BUFFER *wb);
#endif //NETDATA_RRDSETVAR_H