nakadi-client-0.7.0.0: Client library for the Nakadi Event Broker

Copyright(c) Moritz Clasmeier 2017 2018
LicenseBSD3
Maintainermtesseract@silverratio.net
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Nakadi.Subscriptions

Description

This module implements the /subscriptions API.

Synopsis

Documentation

subscriptionCreate' :: MonadNakadi b m => SubscriptionRequest -> m Subscription Source #

POST to /subscriptions. Creates a new subscription. Low level interface.

subscriptionCreate :: (MonadNakadi b m, MonadCatch m) => SubscriptionRequest -> m Subscription Source #

POST to /subscriptions. Creates a new subscription. Does not fail if the requested subscription does already exist.

subscriptionsList' :: MonadNakadi b m => Maybe ApplicationName -> Maybe [EventTypeName] -> Maybe Limit -> Maybe Offset -> m SubscriptionsListResponse Source #

GET to /subscriptions. Retrieves all subscriptions matching the provided filter criteria. Low-level interface using pagination.

subscriptionsSource :: MonadNakadi b m => Maybe ApplicationName -> Maybe [EventTypeName] -> m (ConduitM () [Subscription] m ()) Source #

GET to /subscriptions. Retrieves all subscriptions matching the provided filter criteria. High-level Conduit interface.

subscriptionsList :: MonadNakadi b m => Maybe ApplicationName -> Maybe [EventTypeName] -> m [Subscription] Source #

GET to /subscriptions. Retrieves all subscriptions matching the provided filter criteria. High-level list interface.

withSubscription :: (MonadNakadi b m, MonadMask m) => ApplicationName -> ConsumerGroup -> Set EventTypeName -> SubscriptionPosition -> (Subscription -> m r) -> m r Source #

Experimental API.

Creates a new subscription using the specified parameters via subscriptionCreate and pass it to the provided action.

withTemporarySubscription :: (MonadNakadi b m, MonadMask m) => ApplicationName -> ConsumerGroup -> Set EventTypeName -> SubscriptionPosition -> (Subscription -> m r) -> m r Source #

Experimental API.

Creates a new temporary subscription using the specified parameters via subscriptionCreate and pass it to the provided action. Note that bracket is used to enforce the deletion of the subscription via subscriptionDelete when the provided action returns.

Do NOT use this function if the specified subscription should not be deleted.