userver: alerts::Storage Class Reference
No Matches
alerts::Storage Class Referencefinal

#include <userver/alerts/storage.hpp>

Detailed Description

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< AlertCollectActiveAlerts ()
 Collect fired and active alerts.

Member Function Documentation

◆ FireAlert()

void alerts::Storage::FireAlert ( std::string_view alert_id,
std::string_view description,
std::chrono::seconds duration = kDefaultDuration )

Fire an alert. It will be stopped either after StopAlertNow for the alert_id is called or after duration seconds.

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