Struct mz_kafka_util::client::TimeoutConfig
source · pub struct TimeoutConfig {
pub keepalive: bool,
pub socket_timeout: Duration,
pub transaction_timeout: Duration,
pub socket_connection_setup_timeout: Duration,
pub fetch_metadata_timeout: Duration,
pub progress_record_fetch_timeout: Duration,
pub default_metadata_fetch_interval: Duration,
}
Expand description
Configurable timeouts for Kafka connections.
Fields§
§keepalive: bool
Whether or not to enable
socket_timeout: Duration
The timeout for network requests. Can’t be more than 100ms longer than `transaction_timeout.
transaction_timeout: Duration
The timeout for transactions.
socket_connection_setup_timeout: Duration
The timeout for setting up network connections.
fetch_metadata_timeout: Duration
The timeout for fetching metadata from upstream.
progress_record_fetch_timeout: Duration
The timeout for reading records from the progress topic.
default_metadata_fetch_interval: Duration
The interval we will fetch metadata from, unless overridden by the source.
Implementations§
source§impl TimeoutConfig
impl TimeoutConfig
sourcepub fn build(
keepalive: bool,
socket_timeout: Option<Duration>,
transaction_timeout: Duration,
socket_connection_setup_timeout: Duration,
fetch_metadata_timeout: Duration,
progress_record_fetch_timeout: Option<Duration>,
default_metadata_fetch_interval: Duration,
) -> TimeoutConfig
pub fn build( keepalive: bool, socket_timeout: Option<Duration>, transaction_timeout: Duration, socket_connection_setup_timeout: Duration, fetch_metadata_timeout: Duration, progress_record_fetch_timeout: Option<Duration>, default_metadata_fetch_interval: Duration, ) -> TimeoutConfig
Build a TcpTimeoutConfig
from the given parameters. Parameters outside the supported
range are defaulted and cause an error log.
Trait Implementations§
source§impl Clone for TimeoutConfig
impl Clone for TimeoutConfig
source§fn clone(&self) -> TimeoutConfig
fn clone(&self) -> TimeoutConfig
Returns a copy of the value. Read more
1.0.0 · 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 TimeoutConfig
impl Debug for TimeoutConfig
source§impl Default for TimeoutConfig
impl Default for TimeoutConfig
source§impl<'de> Deserialize<'de> for TimeoutConfig
impl<'de> Deserialize<'de> for TimeoutConfig
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
source§impl PartialEq for TimeoutConfig
impl PartialEq for TimeoutConfig
source§impl Serialize for TimeoutConfig
impl Serialize for TimeoutConfig
impl Copy for TimeoutConfig
impl Eq for TimeoutConfig
impl StructuralPartialEq for TimeoutConfig
Auto Trait Implementations§
impl Freeze for TimeoutConfig
impl RefUnwindSafe for TimeoutConfig
impl Send for TimeoutConfig
impl Sync for TimeoutConfig
impl Unpin for TimeoutConfig
impl UnwindSafe for TimeoutConfig
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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
Creates a shared type from an unshared type.