mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
Initial config file infrastructure
Also unify command line option structure/parsing so everything's in the same order in the code.
This commit is contained in:
17
config.h
17
config.h
@@ -18,6 +18,17 @@ typedef struct
|
||||
|
||||
} t_configuration_options;
|
||||
|
||||
/*
|
||||
* The following will initialize the structure with a minimal set of options;
|
||||
* actual defaults are set in parse_config() before parsing the configuration file
|
||||
*/
|
||||
|
||||
#define T_CONFIGURATION_OPTIONS_INITIALIZER { \
|
||||
/* node settings */ \
|
||||
UNKNOWN_NODE_ID, "", \
|
||||
/* log settings */ \
|
||||
"", "", ""}
|
||||
|
||||
typedef struct ItemListCell
|
||||
{
|
||||
struct ItemListCell *next;
|
||||
@@ -34,8 +45,10 @@ typedef struct ItemList
|
||||
void set_progname(const char *argv0);
|
||||
const char *progname(void);
|
||||
|
||||
bool load_config(const char *config_file, bool verbose, t_configuration_options *options, char *argv0);
|
||||
bool parse_config(t_configuration_options *options);
|
||||
bool reload_config(t_configuration_options *orig_options);
|
||||
|
||||
void item_list_append(ItemList *item_list, char *error_message);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user