pub struct BrokerRegistrationRecord {
pub node_id: NodeId,
pub broker_epoch: i64,
pub incarnation_id: Uuid,
pub host: String,
pub port: u16,
pub rack: Option<String>,
pub endpoints: Vec<BrokerEndpoint>,
pub log_dirs: Vec<Uuid>,
pub fenced: bool,
pub in_controlled_shutdown: bool,
pub cordoned_log_dirs: Option<Vec<Uuid>>,
pub features: BTreeMap<String, (i16, i16)>,
}Fields§
§node_id: NodeId§broker_epoch: i64KIP-903 broker epoch: the raft log offset at which this registration
record committed. The controller leader assigns it at append time in
on_submit_change. A freshly-built literal carries 0 until the
leader stamps it. AlterPartition uses it to fence stale replicas
from the ISR.
incarnation_id: UuidKIP-631: UUID that identifies this specific process invocation of the
broker. Generated once at first boot and persisted in
{log_dir}/incarnation_id. A JVM controller uses it to detect
broker restarts and fence stale replica memberships.
host: StringLegacy single-listener host, used as inter-broker default and by
pre-v9 Metadata responses. v9+ projects Self::endpoints.
port: u16§rack: Option<String>§endpoints: Vec<BrokerEndpoint>Per-listener endpoints. Empty on records written before this
field was added; populated from
BrokerConfig::effective_listeners() for self-registration.
log_dirs: Vec<Uuid>KIP-858 stable IDs for the broker’s online log directories.
Empty at metadata versions before 3.7-IV2 and in legacy snapshots.
fenced: boolKIP-631 fencing state. Kafka writes a new registration fenced (the
RegisterBrokerRecord schema default) and unfences it with a
BrokerRegistrationChangeRecord once the broker catches up.
in_controlled_shutdown: boolKIP-841: the broker is in controlled shutdown. Only a
BrokerRegistrationChangeRecord sets it; only a new registration
clears it.
cordoned_log_dirs: Option<Vec<Uuid>>KIP-1066 cordoned log directories. None until the broker first
reports them in a heartbeat, as in Kafka’s BrokerRegistration. Only
carried from metadata.version 4.3-IV0.
features: BTreeMap<String, (i16, i16)>KIP-584 feature ranges advertised by this broker at registration. Empty only for legacy Krabka snapshots written before the ranges were retained in the image.
Trait Implementations§
Source§impl Clone for BrokerRegistrationRecord
impl Clone for BrokerRegistrationRecord
Source§fn clone(&self) -> BrokerRegistrationRecord
fn clone(&self) -> BrokerRegistrationRecord
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 BrokerRegistrationRecord
impl Debug for BrokerRegistrationRecord
Source§impl<'de> Deserialize<'de> for BrokerRegistrationRecord
impl<'de> Deserialize<'de> for BrokerRegistrationRecord
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>,
impl Eq for BrokerRegistrationRecord
Source§impl PartialEq for BrokerRegistrationRecord
impl PartialEq for BrokerRegistrationRecord
Source§fn eq(&self, other: &BrokerRegistrationRecord) -> bool
fn eq(&self, other: &BrokerRegistrationRecord) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for BrokerRegistrationRecord
impl Serialize for BrokerRegistrationRecord
impl StructuralPartialEq for BrokerRegistrationRecord
Auto Trait Implementations§
impl Freeze for BrokerRegistrationRecord
impl RefUnwindSafe for BrokerRegistrationRecord
impl Send for BrokerRegistrationRecord
impl Sync for BrokerRegistrationRecord
impl Unpin for BrokerRegistrationRecord
impl UnsafeUnpin for BrokerRegistrationRecord
impl UnwindSafe for BrokerRegistrationRecord
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§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();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§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();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§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();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§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();Source§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.
Source§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);