pub trait SpuDirectory {
    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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn create_stream_with_version<'life0, 'life1, 'async_trait, R: Request>(
        &'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,
        R: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

used for connectiong to spu

Required methods

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

create stream to leader replica

Implementors