keybase-protocol 0.1.1

Provides the Keybase types defined in the Keybase AVDL Protocol files for Rust.
Documentation
// Namespace: "keybase.1"
// Protocol: "NotifyRuntimeStats"
#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Serialize, Deserialize};
use serde_repr::{Deserialize_repr, Serialize_repr};use super::*;

use super::common::*;
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum StatsSeverityLevel {
  Normal_0,
  Warning_1,
  Severe_2,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct DbStats {
  #[serde(rename = "type")]
  pub ty: Option<DbType>,
  #[serde(default)]
  pub memCompActive: Option<bool>,
  #[serde(default)]
  pub tableCompActive: Option<bool>,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ProcessType {
  Main_0,
  Kbfs_1,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct ProcessRuntimeStats {
  #[serde(rename = "type")]
  pub ty: Option<ProcessType>,
  #[serde(default)]
  pub cpu: Option<String>,
  #[serde(default)]
  pub resident: Option<String>,
  #[serde(default)]
  pub virt: Option<String>,
  #[serde(default)]
  pub free: Option<String>,
  #[serde(default)]
  pub goheap: Option<String>,
  #[serde(default)]
  pub goheapsys: Option<String>,
  #[serde(default)]
  pub goreleased: Option<String>,
  pub cpuSeverity: Option<StatsSeverityLevel>,
  pub residentSeverity: Option<StatsSeverityLevel>,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct RuntimeStats {
  #[serde(default)]
  pub processStats: Option<Vec<ProcessRuntimeStats>>,
  #[serde(default)]
  pub dbStats: Option<Vec<DbStats>>,
  #[serde(default)]
  pub convLoaderActive: Option<bool>,
  #[serde(default)]
  pub selectiveSyncActive: Option<bool>,
}