Add missing doxygen comments (#1223)

Fixes #1218
This commit is contained in:
Alex Kremer
2024-03-01 15:58:18 +00:00
committed by GitHub
parent b3e63b2491
commit a74970b81e
125 changed files with 2755 additions and 365 deletions

View File

@@ -52,6 +52,9 @@
*/
namespace feed {
/**
* @brief A subscription manager is responsible for managing the subscriptions and publishing the feeds
*/
class SubscriptionManager {
std::reference_wrapper<boost::asio::io_context> ioContext_;
std::shared_ptr<data::BackendInterface const> backend_;
@@ -64,6 +67,12 @@ class SubscriptionManager {
impl::ProposedTransactionFeed proposedTransactionFeed_;
public:
/**
* @brief Construct a new Subscription Manager object
*
* @param ioContext The io context to use
* @param backend The backend to use
*/
SubscriptionManager(
boost::asio::io_context& ioContext,
std::shared_ptr<data::BackendInterface const> const& backend
@@ -141,7 +150,9 @@ public:
/**
* @brief Subscribe to the ledger feed.
* @param subscriber
* @param yield The coroutine context
* @param subscriber The subscriber to the ledger feed
* @return The ledger feed
*/
boost::json::object
subLedger(boost::asio::yield_context yield, SubscriberSharedPtr const& subscriber);
@@ -236,7 +247,8 @@ public:
/**
* @brief Unsubscribe to the transactions feed for particular account.
* @param subscriber
* @param account The account to stop watching
* @param subscriber The subscriber to unsubscribe
*/
void
unsubAccount(ripple::AccountID const& account, SubscriberSharedPtr const& subscriber);
@@ -268,6 +280,8 @@ public:
/**
* @brief Get the number of subscribers.
*
* @return The report of the number of subscribers
*/
boost::json::object
report() const
@@ -299,6 +313,12 @@ class SubscriptionManagerRunner {
std::vector<std::thread> workers_;
public:
/**
* @brief Construct a new Subscription Manager Runner object
*
* @param config The configuration
* @param backend The backend to use
*/
SubscriptionManagerRunner(util::Config const& config, std::shared_ptr<data::BackendInterface> const& backend)
: subscriptionManager_(std::make_shared<SubscriptionManager>(ioContext_, backend))
{
@@ -309,6 +329,11 @@ public:
workers_.emplace_back([&] { ioContext_.run(); });
}
/**
* @brief Get the subscription manager
*
* @return The subscription manager
*/
std::shared_ptr<SubscriptionManager>
getManager()
{