pacemaker 2.1.1-77db578727
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
lrmd_internal.h
Go to the documentation of this file.
1/*
2 * Copyright 2015-2021 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 LRMD_INTERNAL__H
11#define LRMD_INTERNAL__H
12
13#include <stdint.h> // uint32_t
14#include <glib.h> // GList, GHashTable, gpointer
15#include <libxml/tree.h> // xmlNode
16#include <crm/common/ipc.h> // crm_ipc_t
17#include <crm/common/mainloop.h> // mainloop_io_t, ipc_client_callbacks
18#include <crm/common/output_internal.h> // pcmk__output_t
19#include <crm/common/remote_internal.h> // pcmk__remote_t
20#include <crm/lrmd.h> // lrmd_t, lrmd_event_data_t
21
22int lrmd_send_attribute_alert(lrmd_t *lrmd, GList *alert_list,
23 const char *node, uint32_t nodeid,
24 const char *attr_name, const char *attr_value);
25int lrmd_send_node_alert(lrmd_t *lrmd, GList *alert_list,
26 const char *node, uint32_t nodeid, const char *state);
27int lrmd_send_fencing_alert(lrmd_t *lrmd, GList *alert_list,
28 const char *target, const char *task,
29 const char *desc, int op_rc);
30int lrmd_send_resource_alert(lrmd_t *lrmd, GList *alert_list,
31 const char *node, lrmd_event_data_t *op);
32
33int lrmd__remote_send_xml(pcmk__remote_t *session, xmlNode *msg, uint32_t id,
34 const char *msg_type);
35
36/* Shared functions for IPC proxy back end */
37
50
52 struct ipc_client_callbacks *proxy_callbacks,
53 const char *node_name, const char *session_id,
54 const char *channel);
55
56int lrmd__validate_remote_settings(lrmd_t *lrmd, GHashTable *hash);
57void remote_proxy_cb(lrmd_t *lrmd, const char *node_name, xmlNode *msg);
60
61int remote_proxy_dispatch(const char *buffer, ssize_t length,
62 gpointer userdata);
63void remote_proxy_disconnected(gpointer data);
64void remote_proxy_free(gpointer data);
65
66void remote_proxy_relay_event(remote_proxy_t *proxy, xmlNode *msg);
67void remote_proxy_relay_response(remote_proxy_t *proxy, xmlNode *msg,
68 int msg_id);
69
71
72#ifdef HAVE_GNUTLS_GNUTLS_H
73int lrmd__init_remote_key(gnutls_datum_t *key);
74#endif
75
76#endif
char data[0]
Definition cpg.c:10
IPC interface to Pacemaker daemons.
struct crm_ipc_s crm_ipc_t
Definition ipc.h:162
Resource agent executor.
int lrmd_send_node_alert(lrmd_t *lrmd, GList *alert_list, const char *node, uint32_t nodeid, const char *state)
int lrmd_send_attribute_alert(lrmd_t *lrmd, GList *alert_list, const char *node, uint32_t nodeid, const char *attr_name, const char *attr_value)
remote_proxy_t * remote_proxy_new(lrmd_t *lrmd, struct ipc_client_callbacks *proxy_callbacks, const char *node_name, const char *session_id, const char *channel)
void remote_proxy_cb(lrmd_t *lrmd, const char *node_name, xmlNode *msg)
int lrmd__remote_send_xml(pcmk__remote_t *session, xmlNode *msg, uint32_t id, const char *msg_type)
void remote_proxy_nack_shutdown(lrmd_t *lrmd)
We're not going to shutdown as response to a remote proxy shutdown request.
void remote_proxy_free(gpointer data)
void remote_proxy_relay_response(remote_proxy_t *proxy, xmlNode *msg, int msg_id)
int lrmd_send_resource_alert(lrmd_t *lrmd, GList *alert_list, const char *node, lrmd_event_data_t *op)
struct remote_proxy_s remote_proxy_t
int lrmd_send_fencing_alert(lrmd_t *lrmd, GList *alert_list, const char *target, const char *task, const char *desc, int op_rc)
void remote_proxy_ack_shutdown(lrmd_t *lrmd)
Send an acknowledgment of a remote proxy shutdown request.
int remote_proxy_dispatch(const char *buffer, ssize_t length, gpointer userdata)
int lrmd__validate_remote_settings(lrmd_t *lrmd, GHashTable *hash)
void remote_proxy_disconnected(gpointer data)
void lrmd__register_messages(pcmk__output_t *out)
void remote_proxy_relay_event(remote_proxy_t *proxy, xmlNode *msg)
Wrappers for and extensions to glib mainloop.
struct mainloop_io_s mainloop_io_t
Definition mainloop.h:32
Formatted output for pacemaker tools.
const char * target
Definition pcmk_fence.c:29
Definition lrmd.h:510
This structure contains everything that makes up a single output formatter.
mainloop_io_t * source
gboolean is_local
crm_ipc_t * ipc
uint32_t last_request_id