Add runtime schemarouter reconfiguration

The schemarouter now also uses versioned configurations implemented by
shared pointers to configuration objects. Moved all the configuration
management into the Config class. Removed router options from
schemarouter.
This commit is contained in:
Markus Mäkelä
2018-07-09 13:34:04 +03:00
parent 7f67fe6f14
commit 5903e194a7
6 changed files with 47 additions and 119 deletions

View File

@ -48,17 +48,17 @@ struct Config
std::set<std::string> ignored_dbs; /**< Set of ignored databases */
SERVER* preferred_server; /**< Server to prefer in conflict situations */
Config():
refresh_min_interval(0.0),
refresh_databases(false),
debug(false),
ignore_regex(NULL),
ignore_match_data(NULL),
preferred_server(NULL)
Config(MXS_CONFIG_PARAMETER* conf);
~Config()
{
pcre2_match_data_free(ignore_match_data);
pcre2_code_free(ignore_regex);
}
};
typedef std::shared_ptr<Config> SConfig;
/**
* Router statistics
*/