Struct fluvio::metadata::partition::PartitionStatus[]

pub struct PartitionStatus {
    pub resolution: PartitionResolution,
    pub leader: ReplicaStatus,
    pub lsr: u32,
    pub replicas: Vec<ReplicaStatus, Global>,
    pub is_being_deleted: bool,
}

Fields

resolution: PartitionResolutionleader: ReplicaStatuslsr: u32replicas: Vec<ReplicaStatus, Global>is_being_deleted: bool

Implementations

impl PartitionStatus

pub fn leader(leader: impl Into<ReplicaStatus>) -> PartitionStatus

pub fn new(
    leader: impl Into<ReplicaStatus>,
    replicas: Vec<ReplicaStatus, Global>
) -> PartitionStatus

pub fn new2(
    leader: impl Into<ReplicaStatus>,
    replicas: Vec<ReplicaStatus, Global>,
    resolution: PartitionResolution
) -> PartitionStatus

pub fn is_online(&self) -> bool

pub fn is_offline(&self) -> bool

pub fn lsr(&self) -> u32

pub fn replica_iter(&self) -> Iter<'_, ReplicaStatus>

pub fn live_replicas(&self) -> Vec<i32, Global>

pub fn offline_replicas(&self) -> Vec<i32, Global>

pub fn has_live_replicas(&self) -> bool

pub fn set_to_delete(self) -> PartitionStatus

set to being deleted

pub fn candidate_leader<P>(
    &self,
    online: &HashSet<i32, RandomState>,
    policy: &P
) -> Option<i32> where
    P: ElectionPolicy

Fnd best candidate from online replicas If there are multiple matches, find with best score (lowest lag)

pub fn merge(&mut self, other: PartitionStatus)

merge status from spu ignore changes from spu = -1 or offsets = -1

Trait Implementations

impl Clone for PartitionStatus

impl Debug for PartitionStatus

impl Decoder for PartitionStatus

impl Default for PartitionStatus

impl Display for PartitionStatus

impl Encoder for PartitionStatus

impl PartialEq<PartitionStatus> for PartitionStatus

impl Status for PartitionStatus

impl StructuralPartialEq for PartitionStatus

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]