[][src]Trait flv_client::SpuController

pub trait SpuController {
    type Leader: ReplicaLeader;
    type TopicMetadata;
    fn find_leader_for_topic_partition<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        topic: &'life1 str,
        partition: i32
    ) -> Pin<Box<dyn Future<Output = Result<Self::Leader, ClientError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_topic<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        topic: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<String, ClientError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn create_topic<'life0, 'async_trait>(
        &'life0 mut self,
        topic: String,
        replica: ReplicaConfig,
        validate_only: bool
    ) -> Pin<Box<dyn Future<Output = Result<String, ClientError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn topic_metadata<'life0, 'async_trait>(
        &'life0 mut self,
        topics: Option<Vec<String>>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::TopicMetadata>, ClientError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Associated Types

Loading content...

Required methods

fn find_leader_for_topic_partition<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    topic: &'life1 str,
    partition: i32
) -> Pin<Box<dyn Future<Output = Result<Self::Leader, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn delete_topic<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    topic: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn create_topic<'life0, 'async_trait>(
    &'life0 mut self,
    topic: String,
    replica: ReplicaConfig,
    validate_only: bool
) -> Pin<Box<dyn Future<Output = Result<String, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

create topic, for now we return string in order simply interface. Otherwise, we have to add associate type

fn topic_metadata<'life0, 'async_trait>(
    &'life0 mut self,
    topics: Option<Vec<String>>
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::TopicMetadata>, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl<A> SpuController for KfClient<A> where
    A: ToSocketAddrs + Display + Send + Sync
[src]

type Leader = KfLeader

type TopicMetadata = MetadataResponseTopic

fn find_leader_for_topic_partition<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    topic: &'life1 str,
    partition: i32
) -> Pin<Box<dyn Future<Output = Result<Self::Leader, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Find address of the Broker leader for a topic/partition

impl<A> SpuController for ScClient<A> where
    A: ToSocketAddrs + Display + Send + Sync
[src]

type Leader = SpuLeader

type TopicMetadata = FlvFetchTopicResponse

fn find_leader_for_topic_partition<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    topic: &'life1 str,
    partition: i32
) -> Pin<Box<dyn Future<Output = Result<Self::Leader, ClientError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Find address of the SPU leader for a topic/partition

Loading content...