logo

Trait actyx_sdk::service::EventService[][src]

pub trait EventService: Clone + Send {
    fn offsets<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<OffsetsResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn publish<'life0, 'async_trait>(
        &'life0 self,
        request: PublishRequest
    ) -> Pin<Box<dyn Future<Output = Result<PublishResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn query<'life0, 'async_trait>(
        &'life0 self,
        request: QueryRequest
    ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, QueryResponse>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn subscribe<'life0, 'async_trait>(
        &'life0 self,
        request: SubscribeRequest
    ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, SubscribeResponse>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn subscribe_monotonic<'life0, 'async_trait>(
        &'life0 self,
        request: SubscribeMonotonicRequest
    ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, SubscribeMonotonicResponse>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

A service providing retrieval of historic and live events, publishing of new events and access to information about current stream offsets.

Required methods

Returns known offsets across local and replicated streams.

Publishes a set of new events.

Query events known at the time the request was reveived by the service.

Suscribe to events that are currently known by the service followed by new “live” events.

Subscribe to events that are currently known by the service followed by new “live” events until the service learns about events that need to be sorted earlier than an event already received.

Implementors