1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-11-04 16:31:42 +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
committed by Teemu Ollakka
parent 940ba9bd0e
commit 6df17812d9
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>
@@ -458,11 +459,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_;