Add configuration exporting

The runtime configuration of a MaxScale can now be exported to a single
file. This allows modifications made via runtime configuration commands to
be "committed" for later use.
This commit is contained in:
Markus Mäkelä
2018-07-06 10:50:55 +03:00
parent 4a215b9ca2
commit 2df5763b6c
3 changed files with 145 additions and 24 deletions

View File

@ -44,6 +44,16 @@ extern const char *config_monitor_params[];
extern const char *config_filter_params[];
extern const char *config_server_params[];
/**
* Initialize the configuration subsystem
*/
void config_init();
/**
* Finalize the configuration subsystem
*/
void config_finish();
/**
* Set the defaults for the global configuration options
*/
@ -163,4 +173,13 @@ void fix_section_name(char *section);
*/
bool config_global_serialize();
/**
* Export the configuration to a file
*
* @param filename Filename where the configuration will be written
*
* @return True if configuration was successfully exported
*/
bool export_config_file(const char* filename);
MXS_END_DECLS