mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
refactor: migrate processor types (context/error) and websocket types to proxycast-core
This commit is contained in:
@@ -41,6 +41,12 @@ pub mod router;
|
||||
// 凭证池核心(types, pool, health, risk)
|
||||
pub mod credential;
|
||||
|
||||
// 请求处理器核心类型(context, error)
|
||||
pub mod processor;
|
||||
|
||||
// WebSocket 核心类型
|
||||
pub mod websocket;
|
||||
|
||||
// 数据层
|
||||
pub mod content;
|
||||
pub mod database;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
//!
|
||||
//! 定义请求处理过程中的上下文信息
|
||||
|
||||
use crate::models::provider_type::ProviderType;
|
||||
use crate::plugin::PluginContext;
|
||||
use crate::ProviderType;
|
||||
use chrono::{DateTime, Utc};
|
||||
use std::time::Instant;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//! 请求处理器核心类型
|
||||
//!
|
||||
//! 包含请求上下文和处理错误类型定义。
|
||||
//! 完整的请求处理管道(步骤、路由、插件集成等)保留在主 crate 中。
|
||||
|
||||
pub mod context;
|
||||
pub mod error;
|
||||
|
||||
pub use context::RequestContext;
|
||||
pub use error::ProcessError;
|
||||
@@ -0,0 +1,8 @@
|
||||
//! WebSocket 核心类型定义
|
||||
//!
|
||||
//! 包含 WebSocket 连接、消息、配置和统计类型。
|
||||
//! 完整的 WebSocket 处理逻辑(handler、lifecycle、stream)保留在主 crate 中。
|
||||
|
||||
pub mod types;
|
||||
|
||||
pub use types::*;
|
||||
@@ -13,12 +13,10 @@
|
||||
//! 6. 插件后置钩子 (PluginPostStep)
|
||||
//! 7. 统计记录 (TelemetryStep)
|
||||
|
||||
mod context;
|
||||
mod error;
|
||||
// context 和 error 已迁移到 proxycast-core
|
||||
pub use proxycast_core::processor::RequestContext;
|
||||
mod steps;
|
||||
|
||||
pub use context::RequestContext;
|
||||
|
||||
use crate::injection::Injector;
|
||||
use crate::plugin::PluginManager;
|
||||
use crate::resilience::{Failover, Retrier, TimeoutController};
|
||||
|
||||
@@ -12,10 +12,12 @@ mod handler;
|
||||
mod lifecycle;
|
||||
mod processor;
|
||||
mod stream;
|
||||
mod types;
|
||||
|
||||
// types 已迁移到 proxycast-core
|
||||
pub use proxycast_core::websocket::types;
|
||||
|
||||
pub use processor::MessageProcessor;
|
||||
pub use types::{
|
||||
pub use proxycast_core::websocket::{
|
||||
KiroTokenInfo, WsApiRequest, WsApiResponse, WsConfig, WsConnection, WsEndpoint, WsError,
|
||||
WsKiroEvent, WsMessage, WsStats, WsStatsSnapshot, WsStreamChunk, WsStreamEnd,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user