Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etlng::MonitorInterface Class Referenceabstract

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>

Inheritance diagram for etlng::MonitorInterface:

Public Types

using SignalType = boost::signals2::signal<void(uint32_t)>
 

Public Member Functions

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 Public Attributes

static constexpr auto kDEFAULT_REPEAT_INTERVAL = std::chrono::seconds{1}
 

Detailed Description

An interface for the monitor service An implementation of this service is responsible for periodically checking various datasources to detect newly ingested ledgers.

Member Function Documentation

◆ run()

virtual void etlng::MonitorInterface::run ( std::chrono::steady_clock::duration repeatInterval = kDEFAULT_REPEAT_INTERVAL)
pure virtual

Run the monitor service.

Parameters
repeatIntervalThe interval between attempts to check the database for new ledgers

Implemented in etlng::impl::Monitor.

◆ stop()

virtual void etlng::MonitorInterface::stop ( )
pure virtual

Stops the monitor service.

Implemented in etlng::impl::Monitor.

◆ 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
subscriberThe 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: