Add configuration parameter 'event_notifications'

This commit is contained in:
Ian Barwick
2015-03-16 17:31:26 +09:00
parent 922dfd88e5
commit 61ce18ebbe
3 changed files with 118 additions and 3 deletions

View File

@@ -25,6 +25,19 @@
#include "strutil.h"
typedef struct EventNotificationListCell
{
struct EventNotificationListCell *next;
char event_type[MAXLEN];
} EventNotificationListCell;
typedef struct EventNotificationList
{
EventNotificationListCell *head;
EventNotificationListCell *tail;
} EventNotificationList;
typedef struct TablespaceListCell
{
struct TablespaceListCell *next;
@@ -63,12 +76,13 @@ typedef struct
int monitor_interval_secs;
int retry_promote_interval_secs;
int use_replication_slots;
int ignore_external_config_files;
int ignore_external_config_files;
char event_notification_command[MAXLEN];
EventNotificationList event_notifications;
TablespaceList tablespace_mapping;
} t_configuration_options;
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", "", 0, 0, 0, 0, "", {NULL, NULL} }
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", "", 0, 0, 0, 0, "", { NULL, NULL }, {NULL, NULL} }
bool parse_config(const char *config_file, t_configuration_options *options);