Implement config file parsing

This commit is contained in:
Ian Barwick
2017-04-21 12:11:00 +09:00
parent 7d0e061088
commit 0b0a0c69fc
3 changed files with 623 additions and 9 deletions

View File

@@ -61,6 +61,7 @@ typedef struct
char node_name[MAXLEN];
char conninfo[MAXLEN];
char pg_bindir[MAXLEN];
int replication_type;
/* log settings */
char loglevel[MAXLEN];
@@ -102,6 +103,9 @@ typedef struct
char event_notification_command[MAXLEN];
EventNotificationList event_notifications;
/* bdr settings */
int bdr_monitoring_mode;
/* barman settings */
char barman_server[MAXLEN];
char barman_config[MAXLEN];
@@ -114,7 +118,7 @@ typedef struct
#define T_CONFIGURATION_OPTIONS_INITIALIZER { \
/* node information */ \
UNKNOWN_NODE_ID, NO_UPSTREAM_NODE, "", "", "", \
UNKNOWN_NODE_ID, NO_UPSTREAM_NODE, "", "", "", REPLICATION_TYPE_PHYSICAL, \
/* log settings */ \
"", "", "", \
/* standby clone settings */ \
@@ -127,6 +131,8 @@ typedef struct
"", "", "", "", "", "", \
/* event notification settings */ \
"", { NULL, NULL }, \
/* bdr settings */ \
BDR_MONITORING_LOCAL, \
/* barman settings */ \
"", "" }
@@ -141,4 +147,9 @@ bool reload_config(t_configuration_options *orig_options);
void item_list_append(ItemList *item_list, char *error_message);
int repmgr_atoi(const char *s,
const char *config_item,
ItemList *error_list,
bool allow_negative);
#endif