mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
refactor(proxy): remove is_proxy_target in favor of failover_queue
- Remove `is_proxy_target` field from Provider struct (Rust & TypeScript) - Remove related DAO methods: get_proxy_target_provider, set_proxy_target - Remove deprecated Tauri commands: get_proxy_targets, set_proxy_target - Add `is_available()` method to CircuitBreaker for availability checks without consuming HalfOpen probe permits (used in select_providers) - Keep `allow_request()` for actual request gating with permit tracking - Update stream_check to use failover_queue instead of is_proxy_target - Clean up commented-out reset circuit breaker button in ProviderActions - Remove unused useProxyTargets and useSetProxyTarget hooks
This commit is contained in:
@@ -38,10 +38,6 @@ export const providersApi = {
|
||||
return await invoke("switch_provider", { id, app: appId });
|
||||
},
|
||||
|
||||
async setProxyTarget(id: string, appId: AppId): Promise<boolean> {
|
||||
return await invoke("set_proxy_target_provider", { id, app: appId });
|
||||
},
|
||||
|
||||
async importDefault(appId: AppId): Promise<boolean> {
|
||||
return await invoke("import_default_config", { app: appId });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user