|
Clio
develop
The XRP Ledger API server.
|
Application stopper class. On stop it will create a new thread to run all the shutdown tasks. More...
#include <Stopper.hpp>
Public Member Functions | |
| ~Stopper () | |
| Destroy the Stopper object. | |
| void | setOnStop (std::function< void(boost::asio::yield_context)> cb) |
| Set the callback to be called when the application is stopped. | |
| void | stop () |
| Stop the application and run the shutdown tasks. | |
Static Public Member Functions | |
| template<web::ng::SomeServer ServerType> | |
| static std::function< void(boost::asio::yield_context)> | makeOnStopCallback (ServerType &server, etlng::LoadBalancerInterface &balancer, etlng::ETLServiceInterface &etl, feed::SubscriptionManagerInterface &subscriptions, data::BackendInterface &backend, boost::asio::io_context &ioc) |
| Create a callback to be called on application stop. | |
Application stopper class. On stop it will create a new thread to run all the shutdown tasks.
|
inlinestatic |
Create a callback to be called on application stop.
| server | The server to stop. |
| balancer | The load balancer to stop. |
| etl | The ETL service to stop. |
| subscriptions | The subscription manager to stop. |
| backend | The backend to stop. |
| ioc | The io_context to stop. |
| void app::Stopper::setOnStop | ( | std::function< void(boost::asio::yield_context)> | cb | ) |
Set the callback to be called when the application is stopped.
| cb | The callback to be called on application stop. |