1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Introduce set_provider_factory() method for server_state

This allows injecting an application allocated provider into
server_state.

After this virtual provider getter is unnecessary. Made the getter
normal method and fixed unit tests accordingly.
This commit is contained in:
Denis Protivensky
2021-12-14 20:28:56 +03:00
parent 13442a04d8
commit 9bd26d49c5
11 changed files with 302 additions and 308 deletions

View File

@ -30,6 +30,7 @@
#include <cassert>
#include <cstring>
#include <memory>
#include <string>
#include <vector>
#include <ostream>
@ -438,11 +439,12 @@ namespace wsrep
* @param provider_options Initial options to provider
* @param thread_service Optional thread service implementation.
*/
static provider* make_provider(wsrep::server_state&,
const std::string& provider_spec,
const std::string& provider_options,
const wsrep::provider::services& services
= wsrep::provider::services());
static std::unique_ptr<provider> make_provider(
wsrep::server_state&,
const std::string& provider_spec,
const std::string& provider_options,
const wsrep::provider::services& services
= wsrep::provider::services());
protected:
wsrep::server_state& server_state_;