pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
pcmki_scheduler.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-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__PCMKI_PCMKI_SCHEDULER__H
11 #define PCMK__PCMKI_PCMKI_SCHEDULER__H
12 
13 #include <glib.h> // GList
14 #include <stdbool.h> // bool
15 #include <libxml/tree.h> // xmlNode
16 
17 #include <crm/lrmd_events.h> // lrmd_event_data_t
18 #include <crm/pengine/status.h> // pcmk_resource_t, pcmk_scheduler_t
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef struct {
25  const char *id;
26  const char *node_attribute;
27  pcmk_resource_t *dependent; // The resource being colocated
28  pcmk_resource_t *primary; // The resource the dependent is colocated with
29 
30  int dependent_role; // Colocation applies only if dependent has this role
31  int primary_role; // Colocation applies only if primary has this role
32 
33  int score;
34  uint32_t flags; // Group of enum pcmk__coloc_flags
36 
38 
39 void pcmk__schedule_actions(xmlNode *cib, unsigned long long flags,
41 
42 GList *pcmk__copy_node_list(const GList *list, bool reset);
43 
44 xmlNode *pcmk__create_history_xml(xmlNode *parent, lrmd_event_data_t *event,
45  const char *caller_version, int target_rc,
46  const char *node, const char *origin);
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif // PCMK__PCMKI_PCMKI_SCHEDULER__H
void pcmk__schedule_actions(xmlNode *cib, unsigned long long flags, pcmk_scheduler_t *scheduler)
void pcmk__unpack_constraints(pcmk_scheduler_t *scheduler)
xmlNode * pcmk__create_history_xml(xmlNode *parent, lrmd_event_data_t *event, const char *caller_version, int target_rc, const char *node, const char *origin)
pcmk_resource_t * primary
Cluster status and scheduling.
GList * pcmk__copy_node_list(const GList *list, bool reset)
pcmk_scheduler_t * scheduler
pcmk_resource_t * dependent
const char * node_attribute
const char * parent
Definition: cib.c:27
Resource agent executor events.
uint64_t flags
Definition: remote.c:211