mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
refactor: 拆分 gateway 单体为独立 crate,新增 systemd 部署方案
将 gateway 内部的 model-fetch、provider-transport、scheduler-core、 usage-runtime、video-tasks-core 模块提取为独立 crate;重构 gateway 内部模块结构(state/router/cache/data/query 等);移除大量遗留模块 文件;新增 systemd 二进制部署骨架及相关文档;更新前端 usage 相关 API 和组件。
This commit is contained in:
18
crates/aether-video-tasks-core/src/store.rs
Normal file
18
crates/aether-video-tasks-core/src/store.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
use crate::{
|
||||
GeminiVideoTaskSeed, LocalVideoTaskReadResponse, LocalVideoTaskRegistryMutation,
|
||||
LocalVideoTaskSnapshot, OpenAiVideoTaskSeed,
|
||||
};
|
||||
|
||||
pub trait VideoTaskStore: std::fmt::Debug + Send + Sync {
|
||||
fn insert(&self, snapshot: LocalVideoTaskSnapshot);
|
||||
fn read_openai(&self, task_id: &str) -> Option<LocalVideoTaskReadResponse>;
|
||||
fn read_gemini(&self, short_id: &str) -> Option<LocalVideoTaskReadResponse>;
|
||||
fn clone_openai(&self, task_id: &str) -> Option<OpenAiVideoTaskSeed>;
|
||||
fn clone_gemini(&self, short_id: &str) -> Option<GeminiVideoTaskSeed>;
|
||||
fn list_active_snapshots(&self, limit: usize) -> Vec<LocalVideoTaskSnapshot>;
|
||||
fn apply_mutation(&self, mutation: LocalVideoTaskRegistryMutation);
|
||||
fn project_openai(&self, task_id: &str, provider_body: &Map<String, Value>) -> bool;
|
||||
fn project_gemini(&self, short_id: &str, provider_body: &Map<String, Value>) -> bool;
|
||||
}
|
||||
Reference in New Issue
Block a user