mirror of
https://git.proxmox.com/git/proxmox
synced 2025-06-05 10:20:36 +00:00
remove proxmox-rrd-api-types crate, s/RRDTimeFrameResolution/RRDTimeFrame/
Because the types used inside the RRD have other requirements than the API types: - other serialization format - the API may not support all RRD features Signed-off-by: Dietmar Maurer <dietmar@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ab567561b5
commit
4bf2db8666
@ -1,11 +0,0 @@
|
||||
[package]
|
||||
name = "proxmox-rrd-api-types"
|
||||
version = "0.1.0"
|
||||
authors = ["Proxmox Support Team <support@proxmox.com>"]
|
||||
edition = "2018"
|
||||
description = "API type definitions for proxmox-rrd crate."
|
||||
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
proxmox-schema = { version = "1", features = ["api-macro"] }
|
@ -1,33 +0,0 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use proxmox_schema::api;
|
||||
|
||||
#[api()]
|
||||
#[derive(Copy, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "UPPERCASE")]
|
||||
/// RRD consolidation mode
|
||||
pub enum RRDMode {
|
||||
/// Maximum
|
||||
Max,
|
||||
/// Average
|
||||
Average,
|
||||
}
|
||||
|
||||
#[api()]
|
||||
#[derive(Copy, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
/// RRD time frame resolution
|
||||
pub enum RRDTimeFrameResolution {
|
||||
/// Hour
|
||||
Hour,
|
||||
/// Day
|
||||
Day,
|
||||
/// Week
|
||||
Week,
|
||||
/// Month
|
||||
Month,
|
||||
/// Year
|
||||
Year,
|
||||
/// Decade (10 years)
|
||||
Decade,
|
||||
}
|
@ -36,7 +36,7 @@ bitflags!{
|
||||
pub struct RRAv1 {
|
||||
/// Defined the data soure type and consolidation function
|
||||
pub flags: RRAFlags,
|
||||
/// Resulution (seconds) from [RRDTimeFrameResolution]
|
||||
/// Resulution (seconds)
|
||||
pub resolution: u64,
|
||||
/// Last update time (epoch)
|
||||
pub last_update: f64,
|
||||
|
Loading…
Reference in New Issue
Block a user