mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
5d424b1383
Add a new failover queue system that operates independently from provider sortIndex, allowing users to configure failover order per app type. Backend changes: - Add failover_queue table to schema.rs for persistent storage - Create dao/failover.rs with CRUD operations for queue management - Add Tauri commands for queue operations (get, add, remove, reorder, toggle) - Refactor provider_router.rs select_providers() to use failover queue: - Current provider always takes first priority - Queue providers ordered by queue_order as fallback - Only providers with open circuit breakers are included Frontend changes: - Add FailoverQueueItem type to proxy.ts - Extend failover.ts API with queue management methods - Add React Query hooks for queue data fetching and mutations - Create FailoverQueueManager component with drag-and-drop reordering - Integrate queue management into SettingsPage under "Auto Failover" - Add i18n translations for zh and en locales
17 lines
373 B
Rust
17 lines
373 B
Rust
//! Data Access Object layer
|
|
//!
|
|
//! Database access operations for each domain
|
|
|
|
pub mod failover;
|
|
pub mod mcp;
|
|
pub mod prompts;
|
|
pub mod providers;
|
|
pub mod proxy;
|
|
pub mod settings;
|
|
pub mod skills;
|
|
pub mod stream_check;
|
|
|
|
// 所有 DAO 方法都通过 Database impl 提供,无需单独导出
|
|
// 导出 FailoverQueueItem 供外部使用
|
|
pub use failover::FailoverQueueItem;
|