Refactor namespaces part 2 (#820)

Part 2 of refactoring effort
This commit is contained in:
Peter Chen
2023-08-11 12:00:31 -04:00
committed by GitHub
parent 23442ff1a7
commit 696b1a585c
61 changed files with 188 additions and 108 deletions

View File

@@ -24,7 +24,7 @@
#include <etl/LoadBalancer.h>
#include <etl/impl/AsyncData.h>
#include <etl/impl/ForwardCache.h>
#include <subscriptions/SubscriptionManager.h>
#include <feed/SubscriptionManager.h>
#include <util/config/Config.h>
#include <util/log/Logger.h>
@@ -40,7 +40,9 @@
#include <grpcpp/grpcpp.h>
class ProbingSource;
namespace feed {
class SubscriptionManager;
}
// TODO: we use Source so that we can store a vector of Sources
// but we also use CRTP for implementation of the common logic - this is a bit strange because CRTP as used here is
@@ -48,6 +50,8 @@ class SubscriptionManager;
// Maybe we should rework this a bit. At this point there is not too much use in the CRTP implementation - we can move
// things into the base class instead.
namespace etl {
/**
* @brief Base class for all ETL sources
*/
@@ -145,7 +149,7 @@ class SourceImpl : public Source
mutable std::mutex lastMsgTimeMtx_;
std::shared_ptr<BackendInterface> backend_;
std::shared_ptr<SubscriptionManager> subscriptions_;
std::shared_ptr<feed::SubscriptionManager> subscriptions_;
LoadBalancer& balancer_;
etl::detail::ForwardCache forwardCache_;
@@ -179,7 +183,7 @@ public:
util::Config const& config,
boost::asio::io_context& ioContext,
std::shared_ptr<BackendInterface> backend,
std::shared_ptr<SubscriptionManager> subscriptions,
std::shared_ptr<feed::SubscriptionManager> subscriptions,
std::shared_ptr<NetworkValidatedLedgers> networkValidatedLedgers,
LoadBalancer& balancer,
SourceHooks hooks)
@@ -839,7 +843,7 @@ public:
util::Config const& config,
boost::asio::io_context& ioc,
std::shared_ptr<BackendInterface> backend,
std::shared_ptr<SubscriptionManager> subscriptions,
std::shared_ptr<feed::SubscriptionManager> subscriptions,
std::shared_ptr<NetworkValidatedLedgers> nwvl,
LoadBalancer& balancer,
SourceHooks hooks)
@@ -880,7 +884,7 @@ public:
boost::asio::io_context& ioc,
std::optional<std::reference_wrapper<boost::asio::ssl::context>> sslCtx,
std::shared_ptr<BackendInterface> backend,
std::shared_ptr<SubscriptionManager> subscriptions,
std::shared_ptr<feed::SubscriptionManager> subscriptions,
std::shared_ptr<NetworkValidatedLedgers> nwvl,
LoadBalancer& balancer,
SourceHooks hooks)
@@ -915,3 +919,4 @@ public:
return *ws_;
}
};
} // namespace etl