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

pub trait SubscriptionApi {
    pub fn create_subscription<T: Into<FlowId>>(
        &self,
        input: &SubscriptionInput,
        flow_id: T
    ) -> ApiFuture<'_, Subscription>;
pub fn get_subscription<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        flow_id: T
    ) -> ApiFuture<'_, Subscription>;
pub 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>>;
pub fn update_auth<T: Into<FlowId>>(
        &self,
        input: &SubscriptionInput,
        flow_id: T
    ) -> ApiFuture<'_, ()>;
pub fn delete_subscription<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        flow_id: T
    ) -> ApiFuture<'_, ()>;
pub fn get_subscription_cursors<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        flow_id: T
    ) -> ApiFuture<'_, Vec<SubscriptionCursor>>;
pub fn get_subscription_stats<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        show_time_lag: bool,
        flow_id: T
    ) -> ApiFuture<'_, SubscriptionStats>;
pub fn reset_subscription_cursors<T: Into<FlowId>>(
        &self,
        id: SubscriptionId,
        cursors: &[EventTypeCursor],
        flow_id: T
    ) -> ApiFuture<'_, ()>; }

Required methods

pub 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

pub 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

pub 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>>
[src]

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.

pub 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

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

Deletes a subscription.

See also Nakadi Manual

pub 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

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

Exposes statistics of specified subscription.

See also Nakadi Manual

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

Implementors

impl SubscriptionApi for ApiClient[src]

pub 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

pub 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

pub 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

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

Deletes a subscription.

See also Nakadi Manual

pub 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

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