diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:05 +0000 |
commit | 97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch) | |
tree | 02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /libnetdata/eval/eval.h | |
parent | Releasing debian version 1.36.1-1. (diff) | |
download | netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip |
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | libnetdata/eval/eval.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libnetdata/eval/eval.h b/libnetdata/eval/eval.h index 086d171aa..1633ec505 100644 --- a/libnetdata/eval/eval.h +++ b/libnetdata/eval/eval.h @@ -18,8 +18,7 @@ typedef enum rrdcalc_status { } RRDCALC_STATUS; typedef struct eval_variable { - char *name; - uint32_t hash; + STRING *name; struct eval_variable *next; } EVAL_VARIABLE; @@ -70,19 +69,19 @@ typedef struct eval_expression { // parse the given string as an expression and return: // a pointer to an expression if it parsed OK // NULL in which case the pointer to error has the error code -extern EVAL_EXPRESSION *expression_parse(const char *string, const char **failed_at, int *error); +EVAL_EXPRESSION *expression_parse(const char *string, const char **failed_at, int *error); // free all resources allocated for an expression -extern void expression_free(EVAL_EXPRESSION *expression); +void expression_free(EVAL_EXPRESSION *expression); // convert an error code to a message -extern const char *expression_strerror(int error); +const char *expression_strerror(int error); // evaluate an expression and return // 1 = OK, the result is in: expression->result // 2 = FAILED, the error message is in: buffer_tostring(expression->error_msg) -extern int expression_evaluate(EVAL_EXPRESSION *expression); +int expression_evaluate(EVAL_EXPRESSION *expression); -extern int health_variable_lookup(const char *variable, uint32_t hash, struct rrdcalc *rc, NETDATA_DOUBLE *result); +int health_variable_lookup(STRING *variable, struct rrdcalc *rc, NETDATA_DOUBLE *result); #endif //NETDATA_EVAL_H |