mirror of
https://github.com/csehviktor/status-monitor.git
synced 2026-04-28 16:27:34 +02:00
implement duration specifier for history
This commit is contained in:
@@ -65,7 +65,11 @@ impl TryFrom<&Row<'_>> for UptimeStorageModel {
|
||||
pub trait StorageRepository: Send + Sync {
|
||||
async fn record_message(&self, message: &StatusMessage) -> anyhow::Result<()>;
|
||||
async fn record_uptime(&self, agent: &str) -> anyhow::Result<()>;
|
||||
async fn get_history(&self, agent: &str) -> anyhow::Result<Vec<StatusMessage>>;
|
||||
async fn get_history(
|
||||
&self,
|
||||
agent: &str,
|
||||
duration: Option<DateTime<Utc>>,
|
||||
) -> anyhow::Result<Vec<StatusMessage>>;
|
||||
async fn get_agents(&self) -> anyhow::Result<Vec<UptimeMessage>>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user