From 192ece47fb07a1271d972b6a0bf025ffbe2dbfb5 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 14 Feb 2022 12:03:58 +0100 Subject: [PATCH] rrd_cache: add developer docs and make RRD_CACHE private (please use get_rrd_cache instead). Signed-off-by: Dietmar Maurer --- src/rrd_cache.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rrd_cache.rs b/src/rrd_cache.rs index f0fb34b7..6e94728c 100644 --- a/src/rrd_cache.rs +++ b/src/rrd_cache.rs @@ -1,3 +1,9 @@ +//! Round Robin Database cache +//! +//! RRD files are stored under `/var/lib/proxmox-backup/rrdb/`. Only a +//! single process may access and update those files, so we initialize +//! and update RRD data inside `proxmox-backup-proxy`. + use std::path::Path; use anyhow::{format_err, Error}; @@ -12,7 +18,7 @@ use pbs_api_types::{RRDMode, RRDTimeFrame}; const RRD_CACHE_BASEDIR: &str = concat!(PROXMOX_BACKUP_STATE_DIR_M!(), "/rrdb"); -pub static RRD_CACHE: OnceCell = OnceCell::new(); +static RRD_CACHE: OnceCell = OnceCell::new(); /// Get the RRD cache instance pub fn get_rrd_cache() -> Result<&'static RRDCache, Error> {