mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-09 19:01:45 +03:00
Retrieve provider options before provider is initialized
Change provider_options so that it does not depend on provider. Call into config_service when provider is created, i.e. after library is loaded, before it is initialized, so that we can inject additional options at startup. Change the signature of the call provider options callback to take provider_options object as parameter.
This commit is contained in:
@ -214,7 +214,7 @@ namespace wsrep
|
||||
int flags_;
|
||||
};
|
||||
|
||||
provider_options(wsrep::provider&);
|
||||
provider_options();
|
||||
provider_options(const provider_options&) = delete;
|
||||
provider_options& operator=(const provider_options&) = delete;
|
||||
|
||||
@ -225,7 +225,7 @@ namespace wsrep
|
||||
*
|
||||
* @return Provider status code.
|
||||
*/
|
||||
enum wsrep::provider::status initial_options();
|
||||
enum wsrep::provider::status initial_options(wsrep::provider& provider);
|
||||
|
||||
/**
|
||||
* Get the option with the given name
|
||||
@ -241,7 +241,8 @@ namespace wsrep
|
||||
* @return wsrep::provider::error_size_exceeded if memory could
|
||||
* not be allocated for the new value.
|
||||
*/
|
||||
enum wsrep::provider::status set(const std::string& name,
|
||||
enum wsrep::provider::status set(wsrep::provider& provider,
|
||||
const std::string& name,
|
||||
std::unique_ptr<option_value> value);
|
||||
|
||||
/**
|
||||
@ -255,7 +256,6 @@ namespace wsrep
|
||||
void for_each(const std::function<void(option*)>& fn);
|
||||
|
||||
private:
|
||||
provider& provider_;
|
||||
using options_map = std::map<std::string, std::unique_ptr<option>>;
|
||||
options_map options_;
|
||||
};
|
||||
|
Reference in New Issue
Block a user