Trait nakadion::api::SubscriptionApi[][src]

pub trait SubscriptionApi {
    fn create_subscription<T: Into<FlowId>>(
        &self,
        input: &SubscriptionInput,
        flow_id: T
    ) -> ApiFuture<'_, Subscription>;
fn get_subscription<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        flow_id: T
    ) -> ApiFuture<'_, Subscription>;
fn list_subscriptions<T: Into<FlowId>>(
        &self,
        event_type: Option<&EventTypeName>,
        owning_application: Option<&OwningApplication>,
        limit: Option<usize>,
        offset: Option<usize>,
        show_status: bool,
        flow_id: T
    ) -> BoxStream<'static, Result<Subscription, NakadiApiError>>;
fn update_auth<T: Into<FlowId>>(
        &self,
        input: &SubscriptionInput,
        flow_id: T
    ) -> ApiFuture<'_, ()>;
fn delete_subscription<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        flow_id: T
    ) -> ApiFuture<'_, ()>;
fn get_subscription_cursors<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        flow_id: T
    ) -> ApiFuture<'_, Vec<SubscriptionCursor>>;
fn get_subscription_stats<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        show_time_lag: bool,
        flow_id: T
    ) -> ApiFuture<'_, SubscriptionStats>;
fn reset_subscription_cursors<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        cursors: &[EventTypeCursor],
        flow_id: T
    ) -> ApiFuture<'_, ()>; }

Required methods

This endpoint creates a subscription for EventTypes.

See also Nakadi Manual

Returns a subscription identified by id.

See also Nakadi Manual

Lists all subscriptions that exist in a system.

List is ordered by creation date/time descending (newest subscriptions come first).

Returns a stream of Subscriptions. The stream contains an error if requesting a page from Nakadi fails or if the result could not be deserialized.

See also Nakadi Manual

Usage

The parameter offset does not change its meaning. It can be used if streams are created one after the other.

The parameter limit is of limited use. It controls the page size returned by Nakadi. Since a stream is generated it rather controls how many requests (the frequency of calls) are sent to Nakadi to fill the stream.

This endpoint only allows to update the authorization section of a subscription.

All other properties are immutable. This operation is restricted to subjects with administrative role. This call captures the timestamp of the update request.

See also Nakadi Manual

Deletes a subscription.

See also Nakadi Manual

Exposes the currently committed offsets of a subscription.

See also Nakadi Manual

Exposes statistics of specified subscription.

See also Nakadi Manual

Reset subscription offsets to specified values.

See also Nakadi Manual

Implementors