[][src]Trait flv_client::ReplicaLeader

pub trait ReplicaLeader: Send + Sync {
    type OffsetPartitionResponse: PartitionOffset;
    fn config(&self) -> &LeaderConfig;
fn client(&mut self) -> &mut Client<String>;
fn fetch_offsets<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Self::OffsetPartitionResponse, ClientError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn fetch_logs<'a>(
        &'a mut self,
        offset: i64,
        max_bytes: i32,
        isolation: Isolation
    ) -> BoxStream<'a, FetchablePartitionResponse<DefaultRecords>>; fn topic(&self) -> &str { ... }
fn partition(&self) -> i32 { ... }
fn client_id(&self) -> &str { ... }
fn addr(&self) -> &ServerAddress { ... }
fn send_record<'life0, 'async_trait>(
        &'life0 mut self,
        record: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

features for Replica Leader (topic,partition)

Associated Types

type OffsetPartitionResponse: PartitionOffset

Loading content...

Required methods

fn config(&self) -> &LeaderConfig

fn client(&mut self) -> &mut Client<String>

fn fetch_offsets<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Self::OffsetPartitionResponse, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

fn fetch_logs<'a>(
    &'a mut self,
    offset: i64,
    max_bytes: i32,
    isolation: Isolation
) -> BoxStream<'a, FetchablePartitionResponse<DefaultRecords>>

stream of partition response

Loading content...

Provided methods

fn topic(&self) -> &str

fn partition(&self) -> i32

fn client_id(&self) -> &str

fn addr(&self) -> &ServerAddress

fn send_record<'life0, 'async_trait>(
    &'life0 mut self,
    record: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Sends record to a target server (Kf, SPU, or SC)

Loading content...

Implementors

impl ReplicaLeader for KfLeader[src]

type OffsetPartitionResponse = ListOffsetPartitionResponse

fn fetch_logs<'a>(
    &'a mut self,
    _offset: i64,
    _max_bytes: i32,
    _isolation: Isolation
) -> BoxStream<'a, FetchablePartitionResponse<DefaultRecords>>
[src]

Fetch log records from a target server

impl ReplicaLeader for SpuLeader[src]

type OffsetPartitionResponse = FetchOffsetPartitionResponse

fn fetch_logs<'a>(
    &'a mut self,
    offset: i64,
    max_bytes: i32,
    isolation: Isolation
) -> BoxStream<'a, FetchablePartitionResponse<DefaultRecords>>
[src]

stream of partition response

Loading content...