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

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

fn create_subscription<T: Into<FlowId>>(
    &self,
    input: &SubscriptionInput,
    flow_id: T
) -> ApiFuture<'_, Subscription>

This endpoint creates a subscription for EventTypes.

See also Nakadi Manual

fn get_subscription<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    flow_id: T
) -> ApiFuture<'_, Subscription>

Returns a subscription identified by id.

See also Nakadi Manual

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>>

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.

fn update_auth<T: Into<FlowId>>(
    &self,
    input: &SubscriptionInput,
    flow_id: T
) -> ApiFuture<'_, ()>

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

fn delete_subscription<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    flow_id: T
) -> ApiFuture<'_, ()>

Deletes a subscription.

See also Nakadi Manual

fn get_subscription_cursors<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    flow_id: T
) -> ApiFuture<'_, Vec<SubscriptionCursor>>

Exposes the currently committed offsets of a subscription.

See also Nakadi Manual

fn get_subscription_stats<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    show_time_lag: bool,
    flow_id: T
) -> ApiFuture<'_, SubscriptionStats>

Exposes statistics of specified subscription.

See also Nakadi Manual

fn reset_subscription_cursors<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    cursors: &[EventTypeCursor],
    flow_id: T
) -> ApiFuture<'_, ()>

Reset subscription offsets to specified values.

See also Nakadi Manual

Loading content...

Implementors

impl SubscriptionApi for ApiClient[src]

fn create_subscription<T: Into<FlowId>>(
    &self,
    input: &SubscriptionInput,
    flow_id: T
) -> ApiFuture<'_, Subscription>
[src]

This endpoint creates a subscription for EventTypes.

See also Nakadi Manual

fn get_subscription<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    flow_id: T
) -> ApiFuture<'_, Subscription>
[src]

Returns a subscription identified by id.

See also Nakadi Manual

fn update_auth<T: Into<FlowId>>(
    &self,
    input: &SubscriptionInput,
    flow_id: T
) -> ApiFuture<'_, ()>
[src]

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

fn delete_subscription<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    flow_id: T
) -> ApiFuture<'_, ()>
[src]

Deletes a subscription.

See also Nakadi Manual

fn get_subscription_cursors<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    flow_id: T
) -> ApiFuture<'_, Vec<SubscriptionCursor>>
[src]

Exposes the currently committed offsets of a subscription.

See also Nakadi Manual

fn reset_subscription_cursors<T: Into<FlowId>>(
    &self,
    id: SubscriptionId,
    cursors: &[EventTypeCursor],
    flow_id: T
) -> ApiFuture<'_, ()>
[src]

Reset subscription offsets to specified values.

See also Nakadi Manual

Loading content...