mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-27 09:01:50 +03:00
Pass callback to get provider options to provider_v26 constructor
Passing a callback allows constructing the options string using config service after loading the provider but before initializing the provider. This way it is possible get options which are given at DBMS startup, in command line or config file.
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -50,6 +51,7 @@ namespace wsrep
|
||||
class event_service;
|
||||
class client_service;
|
||||
class connection_monitor_service;
|
||||
class provider_options;
|
||||
class stid
|
||||
{
|
||||
public:
|
||||
@ -521,13 +523,13 @@ namespace wsrep
|
||||
* Create a new provider.
|
||||
*
|
||||
* @param provider_spec Provider specification
|
||||
* @param provider_options Initial options to provider
|
||||
* @param provider_options_cb Callback to get initial provider options
|
||||
* @param thread_service Optional thread service implementation.
|
||||
*/
|
||||
static std::unique_ptr<provider> make_provider(
|
||||
wsrep::server_state&,
|
||||
const std::string& provider_spec,
|
||||
const std::string& provider_options,
|
||||
wsrep::server_state&, const std::string& provider_spec,
|
||||
const std::function<int(const provider_options&, std::string&)>&
|
||||
provider_options_cb,
|
||||
const wsrep::provider::services& services
|
||||
= wsrep::provider::services());
|
||||
|
||||
|
Reference in New Issue
Block a user