[READ-ONLY] Mirror of https://github.com/mrgnw/koku. A cron daemon written in Rust — 刻
1use serde::{Deserialize, Serialize};
2
3use crate::state::JobState;
4
5#[derive(Debug, Serialize, Deserialize)]
6pub enum Request {
7 Status,
8 Run(String),
9 Pause(String),
10 Resume(String),
11 Reload,
12}
13
14#[derive(Debug, Serialize, Deserialize)]
15pub enum Response {
16 Status(Vec<JobStatus>),
17 Ok(String),
18 Error(String),
19}
20
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct JobStatus {
23 pub name: String,
24 pub state: JobState,
25 pub last_run: Option<String>,
26 pub last_exit: Option<i32>,
27 pub next_run: Option<String>,
28}