reduct_base/msg/
diagnostics.rs

1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4// Copyright 2024 ReductSoftware UG
5// This Source Code Form is subject to the terms of the Mozilla Public
6//    License, v. 2.0. If a copy of the MPL was not distributed with this
7//    file, You can obtain one at https://mozilla.org/MPL/2.0/.
8#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
9pub struct DiagnosticsError {
10    pub count: u64,
11    pub last_message: String,
12}
13
14#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default)]
15pub struct DiagnosticsItem {
16    pub ok: u64,
17    pub errored: u64,
18    pub errors: HashMap<i16, DiagnosticsError>,
19}
20
21#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default)]
22pub struct Diagnostics {
23    pub hourly: DiagnosticsItem,
24}