pub struct ProxyConfig {
pub listen_address: String,
pub listen_port: u16,
pub max_retries: u8,
pub request_timeout: u64,
pub enable_logging: bool,
pub live_takeover_active: bool,
pub streaming_first_byte_timeout: u64,
pub streaming_idle_timeout: u64,
pub non_streaming_timeout: u64,
}Expand description
代理服务器配置
Fields§
§listen_address: String监听地址
listen_port: u16监听端口
max_retries: u8最大重试次数
request_timeout: u64请求超时时间(秒)- 已废弃,保留兼容
enable_logging: bool是否启用日志
live_takeover_active: bool是否正在接管 Live 配置
streaming_first_byte_timeout: u64流式首字超时(秒)- 等待首个数据块的最大时间,范围 1-120 秒,默认 60 秒
streaming_idle_timeout: u64流式静默超时(秒)- 两个数据块之间的最大间隔,范围 60-600 秒,填 0 禁用(防止中途卡住)
non_streaming_timeout: u64非流式总超时(秒)- 非流式请求的总超时时间,范围 60-1200 秒,默认 600 秒(10 分钟)
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyConfig
impl Debug for ProxyConfig
Source§impl Default for ProxyConfig
impl Default for ProxyConfig
Source§impl<'de> Deserialize<'de> for ProxyConfig
impl<'de> Deserialize<'de> for ProxyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
impl UnwindSafe for ProxyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more