| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #ifndef NETDATA_PATTERN_ARRAY_H |
| 4 | #define NETDATA_PATTERN_ARRAY_H |
| 5 | |
| 6 | #include "libnetdata/libnetdata.h" |
| 7 | #include "rrdlabels.h" |
| 8 | |
| 9 | struct pattern_array { |
| 10 | Word_t key_count; |
| 11 | Pvoid_t JudyL; |
| 12 | }; |
| 13 | |
| 14 | struct pattern_array *pattern_array_allocate(); |
| 15 | struct pattern_array * |
| 16 | pattern_array_add_key_value(struct pattern_array *pa, const char *key, const char *value, char sep); |
| 17 | bool pattern_array_label_match( |
| 18 | struct pattern_array *pa, |
| 19 | RRDLABELS *labels, |
| 20 | char eq, |
| 21 | size_t *searches); |
| 22 | struct pattern_array *pattern_array_add_simple_pattern(struct pattern_array *pa, SIMPLE_PATTERN *pattern, char sep); |
| 23 | struct pattern_array * |
| 24 | pattern_array_add_key_simple_pattern(struct pattern_array *pa, const char *key, SIMPLE_PATTERN *pattern); |
| 25 | void pattern_array_free(struct pattern_array *pa); |
| 26 | |
| 27 | #endif //NETDATA_PATTERN_ARRAY_H |