pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
resources.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_RESOURCES__H
11#define PCMK__CRM_COMMON_RESOURCES__H
12
13#include <stdbool.h> // bool
14#include <sys/types.h> // time_t
15#include <libxml/tree.h> // xmlNode
16#include <glib.h> // gboolean, guint, GList, GHashTable
17
18#include <crm/common/roles.h> // enum rsc_role_e
19#include <crm/common/scheduler_types.h> // pcmk_resource_t, etc.
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
48
51
52// Implementation of pcmk_resource_t
53// @COMPAT Make this internal when we can break API backward compatibility
57 /* @COMPAT Once all members are moved to pcmk__resource_private_t,
58 * We can make that the pcmk_resource_t implementation and drop this
59 * struct altogether, leaving pcmk_resource_t as an opaque public type.
60 */
62
63 // NOTE: sbd (as of at least 1.5.2) uses this
65 char *id; // Resource ID in configuration
66
67 // NOTE: sbd (as of at least 1.5.2) uses this
69 unsigned long long flags; // Group of enum pcmk__rsc_flags
70};
72
73const char *pcmk_resource_id(const pcmk_resource_t *rsc);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif // PCMK__CRM_COMMON_RESOURCES__H
pe_find
Search options for resources (exact resource ID always matches)
Definition resources.h:32
@ pcmk_rsc_match_anon_basename
Also match anonymous clone instances by base name.
Definition resources.h:37
@ pcmk_rsc_match_clone_only
Match only clones and their instances, by either clone or instance ID.
Definition resources.h:40
@ pcmk_rsc_match_basename
Match clone instances (even unique) by base name as well as exact ID.
Definition resources.h:46
@ pcmk_rsc_match_history
Also match clone instance ID from resource history.
Definition resources.h:34
@ pcmk_rsc_match_current_node
If matching by node, compare current node instead of assigned node.
Definition resources.h:43
bool pcmk_resource_is_managed(const pcmk_resource_t *rsc)
Definition resources.c:57
const char * pcmk_resource_id(const pcmk_resource_t *rsc)
Definition resources.c:43
Scheduler API for resource roles.
Type aliases needed to define scheduler objects.
unsigned long long flags
Definition resources.h:69
pcmk__resource_private_t * priv
Definition resources.h:61