24 lines
519 B
Rust
24 lines
519 B
Rust
use serde::{Deserialize, Serialize};
|
|
use serde_json::Value;
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
|
#[serde(rename_all = "snake_case")]
|
|
pub enum AgentType {
|
|
Smart,
|
|
Service,
|
|
System,
|
|
Backup,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct MetricsEnvelope {
|
|
pub hostname: String,
|
|
pub agent_type: AgentType,
|
|
pub timestamp: u64,
|
|
#[serde(default)]
|
|
pub metrics: Value,
|
|
}
|
|
|
|
// Alias for backward compatibility
|
|
pub type MessageEnvelope = MetricsEnvelope;
|