mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-01 05:22:28 +02:00
37 lines
1.1 KiB
Rust
37 lines
1.1 KiB
Rust
use std::collections::BTreeMap;
|
|
use serde::{Deserialize, Serialize};
|
|
use crate::model::StreamInfo;
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
|
pub struct StatusCheck {
|
|
pub status: String,
|
|
pub version: String,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub build_time: Option<String>,
|
|
pub server_time: String,
|
|
pub memory: String,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub cache: Option<String>,
|
|
pub active_users: usize,
|
|
pub active_user_connections: usize,
|
|
pub active_user_streams: Vec<StreamInfo>,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub active_provider_connections: Option<BTreeMap<String, usize>>,
|
|
}
|
|
|
|
impl Default for StatusCheck {
|
|
fn default() -> Self {
|
|
Self {
|
|
status: "n/a".to_string(),
|
|
version: "n/a".to_string(),
|
|
build_time: None,
|
|
server_time: "n/a".to_string(),
|
|
memory: "n/a".to_string(),
|
|
cache: None,
|
|
active_users: 0,
|
|
active_user_connections: 0,
|
|
active_provider_connections: None,
|
|
active_user_streams: Vec::new(),
|
|
}
|
|
}
|
|
} |