Trait Client

Source
pub trait Client:
    SystemClient
    + UserClient
    + PersonalAccessTokenClient
    + StreamClient
    + TopicClient
    + PartitionClient
    + SegmentClient
    + MessageClient
    + ConsumerOffsetClient
    + ConsumerGroupClient
    + Sync
    + Send
    + Debug {
    // Required methods
    fn connect<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), IggyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn disconnect<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), IggyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn shutdown<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), IggyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe_events<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Receiver<DiagnosticEvent>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The client trait which is the main interface to the Iggy server. It consists of multiple modules, each of which is responsible for a specific set of commands. Except the ping, login and get me, all the other methods require authentication.

Required Methods§

Source

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

Connect to the server. Depending on the selected transport and provided configuration it might also perform authentication, retry logic etc. If the client is already connected, it will do nothing.

Source

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

Disconnect from the server. If the client is not connected, it will do nothing.

Source

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

Source

fn subscribe_events<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Receiver<DiagnosticEvent>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to diagnostic events.

Implementors§