]> git.proxmox.com Git - proxmox.git/blobdiff - proxmox-rrd/src/cache/rrd_map.rs
rrd: spell out hard to understand abbreviations in public types
[proxmox.git] / proxmox-rrd / src / cache / rrd_map.rs
index f907d35005d390a35a958fcac8409725560bba46..881b3987e4460bc1c4d9e550865911dbc01e6e70 100644 (file)
@@ -6,21 +6,21 @@ use anyhow::{bail, Error};
 
 use proxmox_sys::fs::create_path;
 
-use crate::rrd::{CF, DST, RRD};
+use crate::rrd::{AggregationFn, DataSourceType, Database};
 
 use super::CacheConfig;
 use crate::Entry;
 
 pub struct RRDMap {
     config: Arc<CacheConfig>,
-    map: HashMap<String, RRD>,
-    load_rrd_cb: fn(path: &Path, rel_path: &str, dst: DST) -> RRD,
+    map: HashMap<String, Database>,
+    load_rrd_cb: fn(path: &Path, rel_path: &str, dst: DataSourceType) -> Database,
 }
 
 impl RRDMap {
     pub(crate) fn new(
         config: Arc<CacheConfig>,
-        load_rrd_cb: fn(path: &Path, rel_path: &str, dst: DST) -> RRD,
+        load_rrd_cb: fn(path: &Path, rel_path: &str, dst: DataSourceType) -> Database,
     ) -> Self {
         Self {
             config,
@@ -34,7 +34,7 @@ impl RRDMap {
         rel_path: &str,
         time: f64,
         value: f64,
-        dst: DST,
+        dst: DataSourceType,
         new_only: bool,
     ) -> Result<(), Error> {
         if let Some(rrd) = self.map.get_mut(rel_path) {
@@ -84,7 +84,7 @@ impl RRDMap {
         &self,
         base: &str,
         name: &str,
-        cf: CF,
+        cf: AggregationFn,
         resolution: u64,
         start: Option<u64>,
         end: Option<u64>,