pub struct ClusterConfig {
pub connection: ConnectionConfig,
pub retry: RetryPolicy,
pub refresh_interval: Duration,
pub max_staleness: Duration,
}Expand description
How to build a Cluster.
Fields§
§connection: ConnectionConfigPer-connection settings.
retry: RetryPolicyRetry behaviour for routed requests.
refresh_interval: DurationHow often the background task refreshes metadata.
Kafka’s own client default is five minutes. A UI wants fresher than that, and metadata for a large cluster is not cheap, so thirty seconds is the compromise — with on-demand invalidation doing the real work.
max_staleness: DurationRefresh before answering when the snapshot is older than this.
Trait Implementations§
Source§impl Clone for ClusterConfig
impl Clone for ClusterConfig
Source§fn clone(&self) -> ClusterConfig
fn clone(&self) -> ClusterConfig
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 ClusterConfig
impl Debug for ClusterConfig
Auto Trait Implementations§
impl Freeze for ClusterConfig
impl RefUnwindSafe for ClusterConfig
impl Send for ClusterConfig
impl Sync for ClusterConfig
impl Unpin for ClusterConfig
impl UnsafeUnpin for ClusterConfig
impl UnwindSafe for ClusterConfig
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