pub struct RpcConfig {
pub thread_num: Option<usize>,
pub max_send_msg_len: i32,
pub max_recv_msg_len: i32,
pub keep_alive_interval: Duration,
pub keep_alive_timeout: Duration,
pub keep_alive_while_idle: bool,
pub default_write_timeout: Duration,
pub default_sql_query_timeout: Duration,
pub connect_timeout: Duration,
}
Expand description
Config for the underlying grpc client
Fields§
§thread_num: Option<usize>
Thread num used by the grpc client.
The number of cpu cores will be used if not set.
max_send_msg_len: i32
The max length of the message sent to server.
-1 means unlimited, and the default value is 20MB.
max_recv_msg_len: i32
The max length of the message received from server.
-1 means unlimited, and the default value is 1GB.
keep_alive_interval: Duration
The interval for htt2 ping frames.
Default value is 600s.
keep_alive_timeout: Duration
Timeout for http2 ping frame acknowledgement.
If the ping is not acknowledged within the timeout, the connection will be closed, and default value is 3s.
keep_alive_while_idle: bool
Enables http2_keep_alive or not.
It is enabled by default.
default_write_timeout: Duration
Timeout for write operation.
Default value is 5s.
default_sql_query_timeout: Duration
Timeout for sql_query operation.
Default value is 60s.
connect_timeout: Duration
Timeout for connection.
Default value is 3s.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RpcConfig
impl RefUnwindSafe for RpcConfig
impl Send for RpcConfig
impl Sync for RpcConfig
impl Unpin for RpcConfig
impl UnwindSafe for RpcConfig
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,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request