pub struct AdminClientConfig {Show 21 fields
pub client_id: Option<String>,
pub request_timeout: Time,
pub default_api_timeout: Option<Time>,
pub retries: u32,
pub retry_backoff: Time,
pub retry_backoff_max: Time,
pub socket_connection_setup_timeout: Time,
pub socket_connection_setup_timeout_max: Time,
pub connections_max_idle: Time,
pub dns_timeout: ClientDnsTimeout,
pub client_dns_lookup: ClientDnsLookup,
pub reconnect_backoff: Time,
pub reconnect_backoff_max: Time,
pub send_buffer: Option<ByteSize>,
pub receive_buffer: Option<ByteSize>,
pub dispatch_queue_capacity: ConnectionDispatchQueueCapacity,
pub frame_max: ClientFrameMax,
pub security: Option<ClientSecurity>,
pub metadata_recovery_strategy: MetadataRecoveryStrategy,
pub metadata_recovery_rebootstrap_trigger: Time,
pub enable_metrics_push: bool,
}Expand description
The settings of an AdminClient.
Default gives Kafka’s AdminClientConfig defaults. A setting that is
None is not set, which matters where Kafka checks whether the user set
a value (client.id, default.api.timeout.ms).
Fields§
§client_id: Option<String>client.id. None or an empty id gives a new adminclient-<n> for
each client, as KafkaAdminClient.generateClientId does.
request_timeout: Timerequest.timeout.ms: the deadline of one request.
default_api_timeout: Option<Time>default.api.timeout.ms: the deadline of a call and its retries when
the call sets no timeout. None uses 60 s, raised to
Self::request_timeout when that is larger.
retries: u32retries: the number of retries of a call before its deadline.
Kafka’s default is Integer.MAX_VALUE.
retry_backoff: Timeretry.backoff.ms.
retry_backoff_max: Timeretry.backoff.max.ms.
socket_connection_setup_timeout: Timesocket.connection.setup.timeout.ms: the connection setup deadline
of the first attempt.
socket_connection_setup_timeout_max: Timesocket.connection.setup.timeout.max.ms: the setup deadline grows
per failed attempt up to this value.
connections_max_idle: Timeconnections.max.idle.ms: a connection with no traffic closes after
this time.
dns_timeout: ClientDnsTimeoutThe DNS lookup deadline of one broker address.
client_dns_lookup: ClientDnsLookupBootstrap DNS address selection policy.
reconnect_backoff: TimeInitial reconnect delay.
reconnect_backoff_max: TimeMaximum reconnect delay.
send_buffer: Option<ByteSize>Outbound socket send buffer; None selects the OS default.
receive_buffer: Option<ByteSize>Outbound socket receive buffer; None selects the OS default.
dispatch_queue_capacity: ConnectionDispatchQueueCapacityCapacity of every connection’s dispatch queue.
frame_max: ClientFrameMaxMaximum accepted response frame size.
security: Option<ClientSecurity>security.protocol and its TLS and SASL settings. None is
plaintext.
metadata_recovery_strategy: MetadataRecoveryStrategymetadata.recovery.strategy (KIP-1102).
metadata_recovery_rebootstrap_trigger: Timemetadata.recovery.rebootstrap.trigger.ms (KIP-1102).
enable_metrics_push: boolenable.metrics.push (KIP-714, default true): push the client
metrics that a broker’s client metrics subscription names, with a
terminating push on close. When it is false, the client sends
neither GetTelemetrySubscriptions nor PushTelemetry, and
client_instance_id fails.
Trait Implementations§
Source§impl Clone for AdminClientConfig
impl Clone for AdminClientConfig
Source§fn clone(&self) -> AdminClientConfig
fn clone(&self) -> AdminClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdminClientConfig
impl Debug for AdminClientConfig
Auto Trait Implementations§
impl !RefUnwindSafe for AdminClientConfig
impl !UnwindSafe for AdminClientConfig
impl Freeze for AdminClientConfig
impl Send for AdminClientConfig
impl Sync for AdminClientConfig
impl Unpin for AdminClientConfig
impl UnsafeUnpin for AdminClientConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);