pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
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 (const 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)
 

Variables

const char * pcmk__alert_keys [PCMK__ALERT_INTERNAL_KEY_MAX][3]
 

Macro Definition Documentation

◆ PCMK__ALERT_DEFAULT_TIMEOUT_MS

#define PCMK__ALERT_DEFAULT_TIMEOUT_MS   (30000)

Definition at line 17 of file alerts_internal.h.

◆ PCMK__ALERT_DEFAULT_TSTAMP_FORMAT

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

Definition at line 20 of file alerts_internal.h.

◆ PCMK__ALERT_INTERNAL_KEY_MAX

#define PCMK__ALERT_INTERNAL_KEY_MAX   19

Definition at line 67 of file alerts_internal.h.

◆ PCMK__ALERT_NODE_SEQUENCE

#define PCMK__ALERT_NODE_SEQUENCE   "CRM_alert_node_sequence"

Definition at line 68 of file alerts_internal.h.

Enumeration Type Documentation

◆ pcmk__alert_flags

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.

◆ pcmk__alert_keys_e

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

◆ pcmk__add_alert_key()

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

Definition at line 149 of file alerts.c.

◆ pcmk__add_alert_key_int()

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

Definition at line 163 of file alerts.c.

◆ pcmk__alert_new()

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 95 of file alerts.c.

◆ pcmk__dup_alert()

pcmk__alert_t* pcmk__dup_alert ( const pcmk__alert_t entry)

Definition at line 133 of file alerts.c.

◆ pcmk__free_alert()

void pcmk__free_alert ( pcmk__alert_t entry)

Definition at line 108 of file alerts.c.

Variable Documentation

◆ pcmk__alert_keys

const char* pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]

Definition at line 22 of file alerts.c.