aws-kinesis-client-0.3.0.1: A producer & consumer client library for AWS Kinesis

CopyrightCopyright © 2013-2014 PivotCloud, Inc.
LicenseApache-2.0
MaintainerJon Sterling <jsterling@alephcloud.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Aws.Kinesis.Client.Common

Contents

Description

 

Synopsis

Documentation

data KinesisKit Source

The KinesisKit contains what is necessary to make a request to Kinesis.

type MonadKinesis m = (MonadIO m, MonadReader KinesisKit m, MonadError SomeException m) Source

The minimal effect modality for running Kinesis commands.

runKinesis :: (MonadKinesis m, ServiceConfiguration req ~ KinesisConfiguration, Transaction req resp) => req -> m resp Source

Run a Kinesis request inside MonadKinesis.

Fetching Shards

streamShardSource :: MonadKinesis m => StreamName -> Source m Shard Source

A Source of shards for a stream.

streamOpenShardSource :: MonadKinesis m => StreamName -> Source m Shard Source

A Source of open shards for a stream.

Miscellaneous monad stuff

mapError :: MonadError e' m => (e -> e') -> EitherT e m a -> m a Source

This function may be used to transform a computation with errors in one type to one with errors in another type. Whilst the argument is fixed at EitherT, this may be used where the argument is in an arbitrary monad, since it will simply get instantiated at EitherT.

handleError :: MonadError e m => (e -> m α) -> m α -> m α Source

This is a verion of catchError with its arguments flipped.

mapEnvironment :: MonadReader r' m => Getter r' r -> ReaderT r m a -> m a Source

Analogous to withReader, but supports a result in MonadReader.