#include <userver/alerts/storage.hpp>
Storage for active fired alerts.
Definition at line 28 of file storage.hpp.
Public Member Functions | |
Storage (const Storage &)=delete | |
Storage (Storage &&)=delete | |
void | FireAlert (std::string_view alert_id, std::string_view description, std::chrono::seconds duration=kDefaultDuration) noexcept |
void | StopAlertNow (std::string_view alert_id) noexcept |
Stop an alert before its duration has ended. | |
std::vector< Alert > | CollectActiveAlerts () |
Collect fired and active alerts. | |
|
noexcept |
Fire an alert. It will be stopped either after StopAlertNow
for the alert_id
is called or after duration
seconds.