Skip to main content

windmill_api/models/
workers_health.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.634.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// WorkersHealth : Workers health status
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WorkersHealth {
17    /// Whether any workers are active
18    #[serde(rename = "healthy")]
19    pub healthy: bool,
20    /// Number of active workers (pinged in last 5 minutes)
21    #[serde(rename = "active_count")]
22    pub active_count: i64,
23    /// List of active worker groups
24    #[serde(rename = "worker_groups")]
25    pub worker_groups: Vec<String>,
26    /// Minimum required worker version
27    #[serde(rename = "min_version")]
28    pub min_version: String,
29    /// List of active worker versions
30    #[serde(rename = "versions")]
31    pub versions: Vec<String>,
32}
33
34impl WorkersHealth {
35    /// Workers health status
36    pub fn new(healthy: bool, active_count: i64, worker_groups: Vec<String>, min_version: String, versions: Vec<String>) -> WorkersHealth {
37        WorkersHealth {
38            healthy,
39            active_count,
40            worker_groups,
41            min_version,
42            versions,
43        }
44    }
45}
46