]> git.proxmox.com Git - proxmox.git/blobdiff - proxmox-rrd/src/cache/journal.rs
rrd: spell out hard to understand abbreviations in public types
[proxmox.git] / proxmox-rrd / src / cache / journal.rs
index b26a81bac42ab232a6f21bc75b758cba47f7a297..c196b342930d9e08f545714e5d06a1665b889ad2 100644 (file)
@@ -15,7 +15,7 @@ use proxmox_sys::fs::atomic_open_or_create_file;
 const RRD_JOURNAL_NAME: &str = "rrd.journal";
 
 use crate::cache::CacheConfig;
-use crate::rrd::DST;
+use crate::rrd::DataSourceType;
 
 // shared state behind RwLock
 pub struct JournalState {
@@ -29,7 +29,7 @@ pub struct JournalState {
 pub struct JournalEntry {
     pub time: f64,
     pub value: f64,
-    pub dst: DST,
+    pub dst: DataSourceType,
     pub rel_path: String,
 }
 
@@ -55,8 +55,8 @@ impl FromStr for JournalEntry {
             .map_err(|_| format_err!("unable to parse data source type"))?;
 
         let dst = match dst {
-            0 => DST::Gauge,
-            1 => DST::Derive,
+            0 => DataSourceType::Gauge,
+            1 => DataSourceType::Derive,
             _ => bail!("got strange value for data source type '{}'", dst),
         };
 
@@ -98,7 +98,7 @@ impl JournalState {
         &mut self,
         time: f64,
         value: f64,
-        dst: DST,
+        dst: DataSourceType,
         rel_path: &str,
     ) -> Result<(), Error> {
         let journal_entry = format!("{}:{}:{}:{}\n", time, value, dst as u8, rel_path);