[pbs-devel] [PATCH proxmox v2 06/43] notify: add getter for notification timestamp

Lukas Wagner l.wagner at proxmox.com
Wed Apr 17 16:34:37 CEST 2024


Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 proxmox-notify/src/lib.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs
index b5829fd..a5caee3 100644
--- a/proxmox-notify/src/lib.rs
+++ b/proxmox-notify/src/lib.rs
@@ -260,6 +260,11 @@ impl Notification {
     pub fn id(&self) -> &Uuid {
         &self.id
     }
+
+    /// Return the notification's timestamp
+    pub fn timestamp(&self) -> i64 {
+        self.metadata.timestamp
+    }
 }
 
 /// Notification configuration
-- 
2.39.2





More information about the pbs-devel mailing list