pacemaker
2.1.8-3980678f03
Scalable High-Availability cluster resource manager
|
Resource agent executor. More...
#include <stdbool.h>
#include <glib.h>
#include <crm_config.h>
#include <crm/lrmd_events.h>
#include <crm/services.h>
#include <crm/lrmd_compat.h>
Go to the source code of this file.
Data Structures | |
struct | lrmd_key_value_s |
struct | lrmd_rsc_info_s |
struct | lrmd_op_info_s |
struct | lrmd_list_s |
struct | lrmd_api_operations_s |
struct | lrmd_s |
Macros | |
#define | LRMD_PROTOCOL_VERSION "1.2" |
#define | LRMD_SUPPORTS_SCHEMA_XFER(x) (compare_version((x), "1.2") >= 0) |
#define | LRMD_COMPATIBLE_PROTOCOL "1" |
#define | LRMD_MIN_PROTOCOL_VERSION "1.0" |
#define | DEFAULT_REMOTE_KEY_LOCATION PACEMAKER_CONFIG_DIR "/authkey" |
#define | ALT_REMOTE_KEY_LOCATION "/etc/corosync/authkey" |
#define | DEFAULT_REMOTE_PORT 3121 |
#define | DEFAULT_REMOTE_USERNAME "lrmd" |
#define | LRMD_OP_RSC_REG "lrmd_rsc_register" |
#define | LRMD_OP_RSC_EXEC "lrmd_rsc_exec" |
#define | LRMD_OP_RSC_CANCEL "lrmd_rsc_cancel" |
#define | LRMD_OP_RSC_UNREG "lrmd_rsc_unregister" |
#define | LRMD_OP_RSC_INFO "lrmd_rsc_info" |
#define | LRMD_OP_RSC_METADATA "lrmd_rsc_metadata" |
#define | LRMD_OP_POKE "lrmd_rsc_poke" |
#define | LRMD_OP_NEW_CLIENT "lrmd_rsc_new_client" |
#define | LRMD_OP_CHECK "lrmd_check" |
#define | LRMD_OP_ALERT_EXEC "lrmd_alert_exec" |
#define | LRMD_OP_GET_RECURRING "lrmd_get_recurring" |
#define | LRMD_IPC_OP_NEW "new" |
#define | LRMD_IPC_OP_DESTROY "destroy" |
#define | LRMD_IPC_OP_EVENT "event" |
#define | LRMD_IPC_OP_REQUEST "request" |
#define | LRMD_IPC_OP_RESPONSE "response" |
#define | LRMD_IPC_OP_SHUTDOWN_REQ "shutdown_req" |
#define | LRMD_IPC_OP_SHUTDOWN_ACK "shutdown_ack" |
#define | LRMD_IPC_OP_SHUTDOWN_NACK "shutdown_nack" |
Typedefs | |
typedef struct lrmd_s | lrmd_t |
typedef struct lrmd_key_value_s | lrmd_key_value_t |
typedef struct lrmd_rsc_info_s | lrmd_rsc_info_t |
typedef struct lrmd_op_info_s | lrmd_op_info_t |
typedef void(* | lrmd_event_callback) (lrmd_event_data_t *event) |
typedef struct lrmd_list_s | lrmd_list_t |
typedef struct lrmd_api_operations_s | lrmd_api_operations_t |
Enumerations | |
enum | lrmd_call_options { lrmd_opt_none = 0, lrmd_opt_notify_orig_only = (1 << 1), lrmd_opt_drop_recurring = 0x00000003, lrmd_opt_notify_changes_only = (1 << 2) } |
Functions | |
lrmd_t * | lrmd_api_new (void) |
Create a new connection to the local executor. More... | |
lrmd_t * | lrmd_remote_api_new (const char *nodename, const char *server, int port) |
Create a new TLS connection to a remote executor. More... | |
bool | lrmd_dispatch (lrmd_t *lrmd) |
Use after lrmd_poll returns 1 to read and dispatch a message. More... | |
int | lrmd_poll (lrmd_t *lrmd, int timeout) |
Check whether a message is available on an executor connection. More... | |
void | lrmd_api_delete (lrmd_t *lrmd) |
Destroy executor connection object. More... | |
lrmd_key_value_t * | lrmd_key_value_add (lrmd_key_value_t *kvp, const char *key, const char *value) |
lrmd_rsc_info_t * | lrmd_new_rsc_info (const char *rsc_id, const char *standard, const char *provider, const char *type) |
lrmd_rsc_info_t * | lrmd_copy_rsc_info (lrmd_rsc_info_t *rsc_info) |
void | lrmd_free_rsc_info (lrmd_rsc_info_t *rsc_info) |
void | lrmd_free_op_info (lrmd_op_info_t *op_info) |
void | lrmd_list_freeall (lrmd_list_t *head) |
void | lrmd_key_value_freeall (lrmd_key_value_t *head) |
Resource agent executor.
Definition in file lrmd.h.
#define DEFAULT_REMOTE_KEY_LOCATION PACEMAKER_CONFIG_DIR "/authkey" |
#define LRMD_SUPPORTS_SCHEMA_XFER | ( | x | ) | (compare_version((x), "1.2") >= 0) |
typedef struct lrmd_api_operations_s lrmd_api_operations_t |
typedef void(* lrmd_event_callback) (lrmd_event_data_t *event) |
typedef struct lrmd_key_value_s lrmd_key_value_t |
typedef struct lrmd_list_s lrmd_list_t |
typedef struct lrmd_op_info_s lrmd_op_info_t |
typedef struct lrmd_rsc_info_s lrmd_rsc_info_t |
enum lrmd_call_options |
void lrmd_api_delete | ( | lrmd_t * | lrmd | ) |
Destroy executor connection object.
[in,out] | lrmd | Executor connection object to destroy |
Definition at line 2409 of file lrmd_client.c.
lrmd_t* lrmd_api_new | ( | void | ) |
Create a new connection to the local executor.
Definition at line 2391 of file lrmd_client.c.
lrmd_rsc_info_t* lrmd_copy_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1820 of file lrmd_client.c.
bool lrmd_dispatch | ( | lrmd_t * | lrmd | ) |
Use after lrmd_poll returns 1 to read and dispatch a message.
[in,out] | lrmd | Executor connection object |
Definition at line 504 of file lrmd_client.c.
void lrmd_free_op_info | ( | lrmd_op_info_t * | op_info | ) |
Definition at line 1877 of file lrmd_client.c.
void lrmd_free_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1827 of file lrmd_client.c.
lrmd_key_value_t* lrmd_key_value_add | ( | lrmd_key_value_t * | kvp, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 148 of file lrmd_client.c.
void lrmd_key_value_freeall | ( | lrmd_key_value_t * | head | ) |
Definition at line 171 of file lrmd_client.c.
void lrmd_list_freeall | ( | lrmd_list_t * | head | ) |
Definition at line 133 of file lrmd_client.c.
lrmd_rsc_info_t* lrmd_new_rsc_info | ( | const char * | rsc_id, |
const char * | standard, | ||
const char * | provider, | ||
const char * | type | ||
) |
Definition at line 1807 of file lrmd_client.c.
int lrmd_poll | ( | lrmd_t * | lrmd, |
int | timeout | ||
) |
Check whether a message is available on an executor connection.
[in,out] | lrmd | Executor connection object to check |
[in] | timeout | Currently ignored |
1 | Message is ready |
0 | Timeout occurred |
negative | errno Error occurred |
Definition at line 470 of file lrmd_client.c.
lrmd_t* lrmd_remote_api_new | ( | const char * | nodename, |
const char * | server, | ||
int | port | ||
) |
Create a new TLS connection to a remote executor.
[in] | nodename | Name of remote node identified with this connection |
[in] | server | Hostname to connect to |
[in] | port | Port number to connect to (or 0 to use default) |
nodename
and server
is non-NULL, it will be used for both purposes. If both are NULL, a local IPC connection will be created instead. Definition at line 2400 of file lrmd_client.c.