Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
feed::impl::SingleFeedBase Class Reference

Base class for single feed. More...

#include <SingleFeedBase.hpp>

Inheritance diagram for feed::impl::SingleFeedBase:

Public Member Functions

 SingleFeedBase (util::async::AnyExecutionContext &executionCtx, std::string const &name)
 Construct a new Single Feed Base object.
 
void sub (SubscriberSharedPtr const &subscriber)
 Subscribe the feed.
 
void unsub (SubscriberSharedPtr const &subscriber)
 Unsubscribe the feed.
 
void pub (std::string msg)
 Publishes the feed in strand.
 
std::uint64_t count () const
 Get the count of subscribers.
 

Detailed Description

Base class for single feed.

Constructor & Destructor Documentation

◆ SingleFeedBase()

feed::impl::SingleFeedBase::SingleFeedBase ( util::async::AnyExecutionContext & executionCtx,
std::string const & name )

Construct a new Single Feed Base object.

Parameters
executionCtxThe actual publish will be called in the strand of this.
nameThe promethues counter name of the feed.

Member Function Documentation

◆ pub()

void feed::impl::SingleFeedBase::pub ( std::string msg)

Publishes the feed in strand.

Parameters
msgThe message.

◆ sub()

void feed::impl::SingleFeedBase::sub ( SubscriberSharedPtr const & subscriber)

Subscribe the feed.

Parameters
subscriber

◆ unsub()

void feed::impl::SingleFeedBase::unsub ( SubscriberSharedPtr const & subscriber)

Unsubscribe the feed.

Parameters
subscriber

The documentation for this class was generated from the following files: