garudust-core 0.13.4

Core traits, types, and error definitions for the Garudust AI agent framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use async_trait::async_trait;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CronJobInfo {
    pub label: String,
    pub schedule: String,
    pub task: String,
    pub created_at: i64,
}

#[async_trait]
pub trait CronManager: Send + Sync + 'static {
    async fn create_job(&self, label: &str, schedule: &str, task: &str) -> anyhow::Result<()>;
    async fn list_jobs(&self) -> Vec<CronJobInfo>;
    async fn delete_job(&self, label: &str) -> anyhow::Result<bool>;
}