pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
pcmki_cluster_queries.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020-2023 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_CLUSTER_QUERIES__H
11 # define PCMK__PCMKI_PCMKI_CLUSTER_QUERIES__H
12 
13 #include <stdbool.h>
14 #include <stdint.h>
15 
16 #include <crm/crm.h>
20 
21 // CIB queries
22 int pcmk__list_nodes(pcmk__output_t *out, const char *node_types,
23  bool bash_export);
24 
25 // Controller queries
26 int pcmk__controller_status(pcmk__output_t *out, const char *node_name,
27  unsigned int message_timeout_ms);
29  unsigned int message_timeout_ms);
30 int pcmk__pacemakerd_status(pcmk__output_t *out, const char *ipc_name,
31  unsigned int message_timeout_ms, bool show_output,
32  enum pcmk_pacemakerd_state *state);
33 int pcmk__query_node_info(pcmk__output_t *out, uint32_t *node_id,
34  char **node_name, char **uuid, char **state,
35  bool *have_quorum, bool *is_remote, bool show_output,
36  unsigned int message_timeout_ms);
37 
57 static inline int
58 pcmk__query_node_name(pcmk__output_t *out, uint32_t nodeid, char **node_name,
59  unsigned int message_timeout_ms)
60 {
61  return pcmk__query_node_info(out, &nodeid, node_name, NULL, NULL, NULL,
62  NULL, false, message_timeout_ms);
63 }
64 
65 // pacemakerd queries
66 int pcmk__pacemakerd_status(pcmk__output_t *out, const char *ipc_name,
67  unsigned int message_timeout_ms, bool show_output,
68  enum pcmk_pacemakerd_state *state);
69 
70 #endif
int pcmk__query_node_info(pcmk__output_t *out, uint32_t *node_id, char **node_name, char **uuid, char **state, bool *have_quorum, bool *is_remote, bool show_output, unsigned int message_timeout_ms)
A dumping ground.
int pcmk__pacemakerd_status(pcmk__output_t *out, const char *ipc_name, unsigned int message_timeout_ms, bool show_output, enum pcmk_pacemakerd_state *state)
Formatted output for pacemaker tools.
int pcmk__designated_controller(pcmk__output_t *out, unsigned int message_timeout_ms)
int pcmk__list_nodes(pcmk__output_t *out, const char *node_types, bool bash_export)
IPC commands for Pacemakerd.
IPC commands for Pacemaker controller.
pcmk_pacemakerd_state
int pcmk__controller_status(pcmk__output_t *out, const char *node_name, unsigned int message_timeout_ms)
This structure contains everything that makes up a single output formatter.