pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
rules_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CRM_COMMON_RULES_INTERNAL__H
11 #define PCMK__CRM_COMMON_RULES_INTERNAL__H
12 
13 #include <regex.h> // regmatch_t
14 #include <libxml/tree.h> // xmlNode
15 
16 #include <crm/common/rules.h> // enum expression_type, etc.
17 #include <crm/common/iso8601.h> // crm_time_t
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
27 };
28 
29 enum expression_type pcmk__condition_type(const xmlNode *condition);
30 char *pcmk__replace_submatches(const char *string, const char *match,
31  const regmatch_t submatches[], int nmatches);
32 enum pcmk__combine pcmk__parse_combine(const char *combine);
33 
34 int pcmk__evaluate_date_expression(const xmlNode *date_expression,
35  const crm_time_t *now,
36  crm_time_t *next_change);
37 int pcmk__evaluate_condition(xmlNode *expr, const pcmk_rule_input_t *rule_input,
38  crm_time_t *next_change);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif // PCMK__CRM_COMMON_RULES_INTERNAL__H
enum pcmk__combine pcmk__parse_combine(const char *combine)
Definition: rules.c:830
Data used to evaluate a rule (any NULL items are ignored)
Definition: rules.h:57
struct crm_time_s crm_time_t
Definition: iso8601.h:32
expression_type
Definition: rules.h:33
pcmk__combine
char * pcmk__replace_submatches(const char *string, const char *match, const regmatch_t submatches[], int nmatches)
Definition: rules.c:613
ISO_8601 Date handling.
int pcmk__evaluate_condition(xmlNode *expr, const pcmk_rule_input_t *rule_input, crm_time_t *next_change)
Definition: rules.c:1251
enum expression_type pcmk__condition_type(const xmlNode *condition)
Definition: rules.c:37
int pcmk__evaluate_date_expression(const xmlNode *date_expression, const crm_time_t *now, crm_time_t *next_change)
Definition: rules.c:469
Scheduler API for rules.