pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
alerts_internal.h File Reference
#include <glib.h>
#include <stdbool.h>
Include dependency graph for alerts_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcmk__alert_t
 

Macros

#define PCMK__ALERT_DEFAULT_TIMEOUT_MS   (30000)
 
#define PCMK__ALERT_DEFAULT_TSTAMP_FORMAT   "%H:%M:%S.%06N"
 
#define PCMK__ALERT_INTERNAL_KEY_MAX   19
 
#define PCMK__ALERT_NODE_SEQUENCE   "CRM_alert_node_sequence"
 

Enumerations

enum  pcmk__alert_flags {
  pcmk__alert_none = 0, pcmk__alert_node = (1 << 0), pcmk__alert_fencing = (1 << 1), pcmk__alert_resource = (1 << 2),
  pcmk__alert_attribute = (1 << 3), pcmk__alert_default
}
 
enum  pcmk__alert_keys_e {
  PCMK__alert_key_recipient = 0, PCMK__alert_key_node, PCMK__alert_key_nodeid, PCMK__alert_key_rsc,
  PCMK__alert_key_task, PCMK__alert_key_interval, PCMK__alert_key_desc, PCMK__alert_key_status,
  PCMK__alert_key_target_rc, PCMK__alert_key_rc, PCMK__alert_key_kind, PCMK__alert_key_version,
  PCMK__alert_key_node_sequence, PCMK__alert_key_timestamp, PCMK__alert_key_attribute_name, PCMK__alert_key_attribute_value,
  PCMK__alert_key_timestamp_epoch, PCMK__alert_key_timestamp_usec, PCMK__alert_key_exec_time, PCMK__alert_key_select_kind,
  PCMK__alert_key_select_attribute_name
}
 

Functions

pcmk__alert_tpcmk__dup_alert (pcmk__alert_t *entry)
 
pcmk__alert_tpcmk__alert_new (const char *id, const char *path)
 Create a new alert entry structure. More...
 
void pcmk__free_alert (pcmk__alert_t *entry)
 
void pcmk__add_alert_key (GHashTable *table, enum pcmk__alert_keys_e name, const char *value)
 
void pcmk__add_alert_key_int (GHashTable *table, enum pcmk__alert_keys_e name, int value)
 
bool pcmk__alert_in_patchset (xmlNode *msg, bool config)
 

Variables

const char * pcmk__alert_keys [PCMK__ALERT_INTERNAL_KEY_MAX][3]
 

Macro Definition Documentation

#define PCMK__ALERT_DEFAULT_TIMEOUT_MS   (30000)

Definition at line 17 of file alerts_internal.h.

#define PCMK__ALERT_DEFAULT_TSTAMP_FORMAT   "%H:%M:%S.%06N"

Definition at line 20 of file alerts_internal.h.

#define PCMK__ALERT_INTERNAL_KEY_MAX   19

Definition at line 67 of file alerts_internal.h.

#define PCMK__ALERT_NODE_SEQUENCE   "CRM_alert_node_sequence"

Definition at line 68 of file alerts_internal.h.

Enumeration Type Documentation

Enumerator
pcmk__alert_none 
pcmk__alert_node 
pcmk__alert_fencing 
pcmk__alert_resource 
pcmk__alert_attribute 
pcmk__alert_default 

Definition at line 22 of file alerts_internal.h.

Enumerator
PCMK__alert_key_recipient 
PCMK__alert_key_node 
PCMK__alert_key_nodeid 
PCMK__alert_key_rsc 
PCMK__alert_key_task 
PCMK__alert_key_interval 
PCMK__alert_key_desc 
PCMK__alert_key_status 
PCMK__alert_key_target_rc 
PCMK__alert_key_rc 
PCMK__alert_key_kind 
PCMK__alert_key_version 
PCMK__alert_key_node_sequence 
PCMK__alert_key_timestamp 
PCMK__alert_key_attribute_name 
PCMK__alert_key_attribute_value 
PCMK__alert_key_timestamp_epoch 
PCMK__alert_key_timestamp_usec 
PCMK__alert_key_exec_time 
PCMK__alert_key_select_kind 
PCMK__alert_key_select_attribute_name 

Definition at line 43 of file alerts_internal.h.

Function Documentation

void pcmk__add_alert_key ( GHashTable *  table,
enum pcmk__alert_keys_e  name,
const char *  value 
)

Definition at line 152 of file alerts.c.

void pcmk__add_alert_key_int ( GHashTable *  table,
enum pcmk__alert_keys_e  name,
int  value 
)

Definition at line 166 of file alerts.c.

bool pcmk__alert_in_patchset ( xmlNode *  msg,
bool  config 
)

Definition at line 198 of file alerts.c.

pcmk__alert_t* pcmk__alert_new ( const char *  id,
const char *  path 
)

Create a new alert entry structure.

Parameters
[in]idID to use
[in]pathPath to alert agent executable
Returns
Pointer to newly allocated alert entry
Note
Non-string fields will be filled in with defaults. It is the caller's responsibility to free the result, using pcmk__free_alert().

Definition at line 94 of file alerts.c.

pcmk__alert_t* pcmk__dup_alert ( pcmk__alert_t entry)

Definition at line 132 of file alerts.c.

void pcmk__free_alert ( pcmk__alert_t entry)

Definition at line 107 of file alerts.c.

Variable Documentation

const char* pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]

Definition at line 21 of file alerts.c.