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

Made provider abstract interface instead of using pimpl.

Added forgotten mock_client_context.hpp.
This commit is contained in:
Teemu Ollakka
2018-04-18 12:46:25 +03:00
parent c1fb9014ce
commit bed41a5ffd
7 changed files with 88 additions and 72 deletions

View File

@ -7,7 +7,7 @@
#include "transaction_context.hpp"
// Todo: refactor into provider factory
#include "mock_provider_impl.hpp"
#include "mock_provider.hpp"
#include "wsrep_provider_v26.hpp"
#include <wsrep_api.h>
@ -64,14 +64,13 @@ int trrep::server_context::load_provider(const std::string& provider_spec)
{
if (provider_spec == "mock")
{
provider_ = new trrep::provider(new trrep::mock_provider_impl);
provider_ = new trrep::mock_provider;
}
else
{
struct wsrep_init_args init_args;
init_args.apply_cb = &apply_cb;
provider_ = new trrep::provider(
new trrep::wsrep_provider_v26(&init_args));
provider_ = new trrep::wsrep_provider_v26(&init_args);
}
return 0;
}