Trait fluvio::spu::SpuDirectory
source · pub trait SpuDirectory {
// Required methods
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_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>>
where R: Sync + Send + 'async_trait + Request,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
used for connecting to spu
Required Methods§
sourcefn 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
sourcefn 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
Object Safety§
This trait is not object safe.