Skip to main content

kbolt_types/
local.rs

1use std::path::PathBuf;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
6#[serde(rename_all = "snake_case")]
7pub enum LocalAction {
8    Setup,
9    Start,
10    Stop,
11    Status,
12    EnableDeep,
13}
14
15#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
16pub struct LocalReport {
17    pub action: LocalAction,
18    pub config_file: PathBuf,
19    pub cache_dir: PathBuf,
20    pub llama_server_path: Option<PathBuf>,
21    pub ready: bool,
22    pub notes: Vec<String>,
23    pub services: Vec<LocalServiceReport>,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
27pub struct LocalServiceReport {
28    pub name: String,
29    pub provider: String,
30    pub enabled: bool,
31    pub configured: bool,
32    pub managed: bool,
33    pub running: bool,
34    pub ready: bool,
35    pub model: String,
36    pub model_path: PathBuf,
37    pub endpoint: String,
38    pub port: u16,
39    pub pid: Option<u32>,
40    pub pid_file: PathBuf,
41    pub log_file: PathBuf,
42    pub issue: Option<String>,
43}