An interface for the monitor service An implementation of this service is responsible for periodically checking various datasources to detect newly ingested ledgers.
More...
#include <MonitorInterface.hpp>
|
using | SignalType = boost::signals2::signal<void(uint32_t)> |
|
|
virtual boost::signals2::scoped_connection | subscribe (SignalType::slot_type const &subscriber)=0 |
| Allows clients to get notified when a new ledger becomes available in Clio's database.
|
|
virtual void | run (std::chrono::steady_clock::duration repeatInterval=kDEFAULT_REPEAT_INTERVAL)=0 |
| Run the monitor service.
|
|
virtual void | stop ()=0 |
| Stops the monitor service.
|
|
|
static constexpr auto | kDEFAULT_REPEAT_INTERVAL = std::chrono::seconds{1} |
|
An interface for the monitor service An implementation of this service is responsible for periodically checking various datasources to detect newly ingested ledgers.
◆ run()
virtual void etlng::MonitorInterface::run |
( |
std::chrono::steady_clock::duration | repeatInterval = kDEFAULT_REPEAT_INTERVAL | ) |
|
|
pure virtual |
Run the monitor service.
- Parameters
-
repeatInterval | The interval between attempts to check the database for new ledgers |
Implemented in etlng::impl::Monitor.
◆ stop()
virtual void etlng::MonitorInterface::stop |
( |
| ) |
|
|
pure virtual |
◆ subscribe()
virtual boost::signals2::scoped_connection etlng::MonitorInterface::subscribe |
( |
SignalType::slot_type const & | subscriber | ) |
|
|
nodiscardpure virtual |
Allows clients to get notified when a new ledger becomes available in Clio's database.
- Parameters
-
subscriber | The slot to connect |
- Returns
- A connection object that automatically disconnects the subscription once destroyed
Implemented in etlng::impl::Monitor.
The documentation for this class was generated from the following file: