pub struct ControllerConfig {Show 34 fields
pub client_dispatch_queue_capacity: ConnectionDispatchQueueCapacity,
pub client_frame_max: ClientFrameMax,
pub node_id: NodeId,
pub bootstrap_servers: Vec<String>,
pub directory_id: Uuid,
pub auto_join: bool,
pub observer_lag_bound: u64,
pub initial_voters: VoterSet,
pub controller_listen_addr: SocketAddr,
pub log_dir: PathBuf,
pub election_timeout: Time,
pub fetch_timeout: Time,
pub heartbeat_interval: Option<Time>,
pub controller_fetch_miss_limit: ControllerFetchMissLimit,
pub metadata_raft_command_queue_capacity: MetadataRaftCommandQueueCapacity,
pub metadata_raft_fetch_max: MetadataRaftFetchMax,
pub client_id: String,
pub bootstrap_mode: BootstrapMode,
pub bootstrap_records: Vec<MetadataRecord>,
pub default_min_insync_replicas: i32,
pub cluster_id: Option<Uuid>,
pub dialer: Option<Arc<dyn OutboundDialer>>,
pub handshake: Option<Arc<dyn RaftListenerHandshake>>,
pub shard_router: Option<Arc<dyn RaftShardRouter>>,
pub admin_router: Option<Arc<dyn ControllerAdminRouter>>,
pub unstable_api_versions: UnstableApiVersions,
pub unstable_feature_versions: UnstableFeatureVersions,
pub listener_limits: ListenerLimits,
pub max_bytes_between_snapshots: ByteSize,
pub max_snapshot_interval: Time,
pub snapshot_interval_records: u64,
pub metadata_snapshot_fetch_max: ByteSize,
pub metadata_log: MetadataLogConfig,
pub event_queue_recorder: Arc<dyn EventQueueRecorder>,
}Fields§
§client_dispatch_queue_capacity: ConnectionDispatchQueueCapacityCapacity used by outbound controller client connections.
client_frame_max: ClientFrameMaxMaximum frame size used by outbound controller client connections.
node_id: NodeId§bootstrap_servers: Vec<String>Endpoints used only to discover the leader at cold start (KIP-853 dynamic).
directory_id: UuidThis replica’s stable directory id (generated at format time).
auto_join: boolIssue AddVoter for self once caught up as an observer.
observer_lag_bound: u64Max allowed lag (in log entries) for an observer to be promotable.
initial_voters: VoterSetInitial voter set for the bootstrapping node only; empty for joiners.
controller_listen_addr: SocketAddr§log_dir: PathBufThe metadata log directory, Kafka’s metadata.log.dir. The controller
keeps the metadata partition in its
METADATA_PARTITION_DIR subdirectory.
election_timeout: TimeKafka’s controller.quorum.election.timeout.ms: the base of the
randomized election timer.
fetch_timeout: TimeKafka’s controller.quorum.fetch.timeout.ms: the follower and observer
fetch watchdog, and the base of the leader’s check-quorum window.
heartbeat_interval: Option<Time>Explicit heartbeat cadence. None preserves the derived
fetch_timeout / 3 behavior.
controller_fetch_miss_limit: ControllerFetchMissLimit§metadata_raft_command_queue_capacity: MetadataRaftCommandQueueCapacity§metadata_raft_fetch_max: MetadataRaftFetchMax§client_id: String§bootstrap_mode: BootstrapMode§bootstrap_records: Vec<MetadataRecord>The bootstrap metadata of a static quorum: Kafka’s
bootstrap.checkpoint, which krabka-format writes as
bootstrap.records.bin.
The active controller writes these records once, when it activates on
a metadata log that holds no metadata.version. A bootstrap checkpoint
at offset 0 and epoch 0 that holds metadata records replaces them, as
Kafka’s QuorumController.handleLoadBootstrap does. An empty list
writes nothing.
default_min_insync_replicas: i32This node’s static min.insync.replicas: Kafka’s
ConfigurationControlManager.getStaticallyConfiguredMinInsyncReplicas.
When the bootstrap records finalize eligible.leader.replicas.version
above 0, the active controller writes it as the cluster-level
min.insync.replicas together with them, as Kafka’s
ActivationRecordsGenerator.recordsForEmptyLog does. Default: 1.
cluster_id: Option<Uuid>Cluster UUID applied to the MetadataImage on first construction.
None falls back to Uuid::nil() (legacy single-node default).
The operator sets this to the KafkaCluster UID so every broker
in the same cluster shares one identifier across restarts.
dialer: Option<Arc<dyn OutboundDialer>>Optional outbound dialer. None means: open a plain TCP socket
to peers (legacy PLAINTEXT-only path). The broker injects an
InterBrokerClient-backed dialer here when inter-broker TLS or
SASL is configured.
handshake: Option<Arc<dyn RaftListenerHandshake>>Optional inbound handshake hook. None keeps the legacy
PLAINTEXT path. The broker injects a BrokerRaftHandshake
implementation here when the controller listener should
terminate TLS and/or SASL before raft frames start flowing.
shard_router: Option<Arc<dyn RaftShardRouter>>Optional KIP-595 shard router. Metadata traffic returns None; diskless
WAL shards return an encoded response body and bypass metadata dispatch.
admin_router: Option<Arc<dyn ControllerAdminRouter>>Optional KIP-919 Admin router. The broker injects its existing handler registry here after construction, keeping controller and broker semantics on one implementation.
unstable_api_versions: UnstableApiVersionsKafka’s internal unstable.api.versions.enable: whether the controller
listener advertises and accepts a latestVersionUnstable version, and
whether it advertises feature levels past the latest production ones.
Kafka builds the listener’s SimpleApiVersionManager with this flag
alone.
unstable_feature_versions: UnstableFeatureVersionsKafka’s internal unstable.feature.versions.enable: the flag the
controller’s own QuorumFeatures use, so it caps the feature levels this
controller accepts on replay and refuses to start above.
listener_limits: ListenerLimitsThe request-size, idle and connection limits of the controller listener.
max_bytes_between_snapshots: ByteSizemetadata.log.max.record.bytes.between.snapshots (default 20 MiB).
max_snapshot_interval: Timemetadata.log.max.snapshot.interval.ms (default 1 h; 0 = disabled).
snapshot_interval_records: u64Snapshot once committed offset advances this many records past the last
snapshot. The cleaning by Self::metadata_log’s retention limits
then decides when the log below a snapshot goes. 0 disables this
trigger.
metadata_snapshot_fetch_max: ByteSizeMaximum metadata snapshot size this follower will fetch. Deployments may lower the default 1 GiB security ceiling but cannot raise it.
metadata_log: MetadataLogConfigHow the metadata log rolls, how long it keeps the prefix a snapshot covers, and how often an idle leader appends to it.
event_queue_recorder: Arc<dyn EventQueueRecorder>Where the engine loop reports Kafka’s controller event-queue measurements. The broker passes its metrics registry.
Implementations§
Trait Implementations§
Source§impl Clone for ControllerConfig
impl Clone for ControllerConfig
Source§fn clone(&self) -> ControllerConfig
fn clone(&self) -> ControllerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ControllerConfig
impl !UnwindSafe for ControllerConfig
impl Freeze for ControllerConfig
impl Send for ControllerConfig
impl Sync for ControllerConfig
impl Unpin for ControllerConfig
impl UnsafeUnpin for ControllerConfig
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<F> FnGhost for F
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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);