pub struct SpuPool { /* private fields */ }
Expand description
connection pool to spu
Implementations§
source§impl SpuPool
impl SpuPool
pub async fn create_serial_socket_from_leader( &self, leader_id: SpuId ) -> Result<VersionedSerialSocket, FluvioError>
pub async fn topic_exists( &self, topic: impl Into<String> ) -> Result<bool, FluvioError>
Trait Implementations§
source§impl SpuDirectory for SpuPool
impl SpuDirectory for SpuPool
source§fn create_serial_socket<'life0, 'life1, 'async_trait>(
&'life0 self,
replica: &'life1 ReplicaKey
) -> Pin<Box<dyn Future<Output = Result<VersionedSerialSocket, FluvioError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_serial_socket<'life0, 'life1, 'async_trait>(
&'life0 self,
replica: &'life1 ReplicaKey
) -> Pin<Box<dyn Future<Output = Result<VersionedSerialSocket, FluvioError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create request/response socket to SPU for a replica
All sockets to same SPU use a single TCP connection. First this looks up SPU address in SPU metadata and try to see if there is an existing TCP connection. If not, it will create a new connection and creates socket to it
source§fn create_stream_with_version<'life0, 'life1, 'async_trait, R>(
&'life0 self,
replica: &'life1 ReplicaKey,
request: R,
version: i16
) -> Pin<Box<dyn Future<Output = Result<AsyncResponse<R>, FluvioError>> + Send + 'async_trait>>
fn create_stream_with_version<'life0, 'life1, 'async_trait, R>( &'life0 self, replica: &'life1 ReplicaKey, request: R, version: i16 ) -> Pin<Box<dyn Future<Output = Result<AsyncResponse<R>, FluvioError>> + Send + 'async_trait>>
create stream to leader replica
Auto Trait Implementations§
impl !RefUnwindSafe for SpuPool
impl Send for SpuPool
impl Sync for SpuPool
impl Unpin for SpuPool
impl !UnwindSafe for SpuPool
Blanket Implementations§
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
Mutably borrows from an owned value. Read more