10 #ifndef PCMK__CRM_LRMD__H    11 #  define PCMK__CRM_LRMD__H    44 #define LRMD_PROTOCOL_VERSION "1.2"    46 #define LRMD_SUPPORTS_SCHEMA_XFER(x) (compare_version((x), "1.2") >= 0)    52 #define LRMD_COMPATIBLE_PROTOCOL "1"    62 #define LRMD_MIN_PROTOCOL_VERSION "1.0"    65 #define DEFAULT_REMOTE_KEY_LOCATION PACEMAKER_CONFIG_DIR "/authkey"    66 #define ALT_REMOTE_KEY_LOCATION "/etc/corosync/authkey"    67 #define DEFAULT_REMOTE_PORT 3121    68 #define DEFAULT_REMOTE_USERNAME "lrmd"    70 #define LRMD_OP_RSC_REG           "lrmd_rsc_register"    71 #define LRMD_OP_RSC_EXEC          "lrmd_rsc_exec"    72 #define LRMD_OP_RSC_CANCEL        "lrmd_rsc_cancel"    73 #define LRMD_OP_RSC_UNREG         "lrmd_rsc_unregister"    74 #define LRMD_OP_RSC_INFO          "lrmd_rsc_info"    75 #define LRMD_OP_RSC_METADATA      "lrmd_rsc_metadata"    76 #define LRMD_OP_POKE              "lrmd_rsc_poke"    77 #define LRMD_OP_NEW_CLIENT        "lrmd_rsc_new_client"    78 #define LRMD_OP_CHECK             "lrmd_check"    79 #define LRMD_OP_ALERT_EXEC        "lrmd_alert_exec"    80 #define LRMD_OP_GET_RECURRING     "lrmd_get_recurring"    82 #define LRMD_IPC_OP_NEW           "new"    83 #define LRMD_IPC_OP_DESTROY       "destroy"    84 #define LRMD_IPC_OP_EVENT         "event"    85 #define LRMD_IPC_OP_REQUEST       "request"    86 #define LRMD_IPC_OP_RESPONSE      "response"    87 #define LRMD_IPC_OP_SHUTDOWN_REQ  "shutdown_req"    88 #define LRMD_IPC_OP_SHUTDOWN_ACK  "shutdown_ack"    89 #define LRMD_IPC_OP_SHUTDOWN_NACK "shutdown_nack"   182                                    const char *provider, 
const char *
type);
   270                          const char *provider, 
const char *agent,
   350                  const char *userdata, guint interval_ms, 
int timeout,
   397                          const char *provider, 
const char *agent,
   415                         const char *standard, 
const char *provider);
   464                        const char *alert_path, 
int timeout,
   484                                 const char *provider, 
const char *agent,
   495 static inline const char *
   504             return "exec_complete";
   517 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 
struct lrmd_rsc_info_s lrmd_rsc_info_t
 
int(* get_recurring_ops)(lrmd_t *lrmd, const char *rsc_id, int timeout_ms, enum lrmd_call_options options, GList **output)
Retrieve recurring operations registered for a resource. 
 
int(* connect_async)(lrmd_t *lrmd, const char *client_name, int timeout)
Initiate an executor connection without blocking. 
 
void(* lrmd_event_callback)(lrmd_event_data_t *event)
 
void lrmd_free_op_info(lrmd_op_info_t *op_info)
 
void lrmd_list_freeall(lrmd_list_t *head)
 
Deprecated executor utilities. 
 
enum crm_ais_msg_types type
 
int(* cancel)(lrmd_t *lrmd, const char *rsc_id, const char *action, guint interval_ms)
Cancel a recurring resource action. 
 
lrmd_t * lrmd_remote_api_new(const char *nodename, const char *server, int port)
Create a new TLS connection to a remote executor. 
 
Send notifications for recurring operations only when the result changes. 
 
struct lrmd_api_operations_s lrmd_api_operations_t
 
int(* exec)(lrmd_t *lrmd, const char *rsc_id, const char *action, const char *userdata, guint interval_ms, int timeout, int start_delay, enum lrmd_call_options options, lrmd_key_value_t *params)
Request execution of a resource action. 
 
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)
 
int(* exec_alert)(lrmd_t *lrmd, const char *alert_id, const char *alert_path, int timeout, lrmd_key_value_t *params)
Execute an alert agent. 
 
int(* poke_connection)(lrmd_t *lrmd)
Poke executor connection to verify it is still active. 
 
struct lrmd_list_s * next
 
int(* connect)(lrmd_t *lrmd, const char *client_name, int *fd)
Connect to an executor. 
 
lrmd_t * lrmd_api_new(void)
Create a new connection to the local executor. 
 
bool lrmd_dispatch(lrmd_t *lrmd)
Use after lrmd_poll returns 1 to read and dispatch a message. 
 
lrmd_key_value_t * lrmd_key_value_add(lrmd_key_value_t *kvp, const char *key, const char *value)
 
int(* get_metadata_params)(lrmd_t *lrmd, const char *standard, const char *provider, const char *agent, char **output, enum lrmd_call_options options, lrmd_key_value_t *params)
Retrieve resource agent metadata synchronously with parameters. 
 
Notify only the client that made the request (rather than all clients) 
 
struct lrmd_key_value_s * next
 
int(* list_agents)(lrmd_t *lrmd, lrmd_list_t **agents, const char *standard, const char *provider)
Retrieve a list of installed resource agents. 
 
int(* unregister_rsc)(lrmd_t *lrmd, const char *rsc_id, enum lrmd_call_options options)
Unregister a resource from the executor. 
 
int(* disconnect)(lrmd_t *lrmd)
Disconnect from the executor. 
 
void lrmd_key_value_freeall(lrmd_key_value_t *head)
 
struct lrmd_key_value_s lrmd_key_value_t
 
lrmd_api_operations_t * cmds
 
int(* list_standards)(lrmd_t *lrmd, lrmd_list_t **standards)
Retrieve a list of supported standards. 
 
int lrmd_poll(lrmd_t *lrmd, int timeout)
Check whether a message is available on an executor connection. 
 
int(* list_ocf_providers)(lrmd_t *lrmd, const char *agent, lrmd_list_t **providers)
Retrieve a list of resource agent providers. 
 
struct lrmd_list_s lrmd_list_t
 
int(* register_rsc)(lrmd_t *lrmd, const char *rsc_id, const char *standard, const char *provider, const char *agent, enum lrmd_call_options options)
Register a resource with the executor. 
 
void lrmd_free_rsc_info(lrmd_rsc_info_t *rsc_info)
 
struct lrmd_op_info_s lrmd_op_info_t
 
void lrmd_api_delete(lrmd_t *lrmd)
Destroy executor connection object. 
 
Resource agent executor events. 
 
int(* is_connected)(lrmd_t *lrmd)
Check whether connection to executor daemon is (still) active. 
 
int(* get_metadata)(lrmd_t *lrmd, const char *standard, const char *provider, const char *agent, char **output, enum lrmd_call_options options)
Retrieve resource agent metadata synchronously. 
 
void(* set_callback)(lrmd_t *lrmd, lrmd_event_callback callback)
Set a callback for executor events.