Copyright | Copyright © 2013-2014 PivotCloud, Inc. |
---|---|
License | Apache-2.0 |
Maintainer | Jon Sterling <jsterling@alephcloud.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- data KinesisKit = KinesisKit {}
- kkConfiguration :: Lens' KinesisKit Configuration
- kkKinesisConfiguration :: Lens' KinesisKit (KinesisConfiguration NormalQuery)
- kkManager :: Lens' KinesisKit Manager
- type MonadKinesis m = (MonadIO m, MonadReader KinesisKit m, MonadError SomeException m)
- runKinesis :: (MonadKinesis m, ServiceConfiguration req ~ KinesisConfiguration, Transaction req resp) => req -> m resp
- streamShardSource :: MonadKinesis m => StreamName -> Source m Shard
- streamOpenShardSource :: MonadKinesis m => StreamName -> Source m Shard
- shardIsOpen :: Shard -> Bool
- mapError :: MonadError e' m => (e -> e') -> EitherT e m a -> m a
- handleError :: MonadError e m => (e -> m α) -> m α -> m α
- mapEnvironment :: MonadReader r' m => Getter r' r -> ReaderT r m a -> m a
Documentation
data KinesisKit Source
The KinesisKit
contains what is necessary to make a request to Kinesis.
kkConfiguration :: Lens' KinesisKit Configuration Source
A lens for _kkConfiguration
.
kkKinesisConfiguration :: Lens' KinesisKit (KinesisConfiguration NormalQuery) Source
A lens for _kkKinesisConfiguration
.
kkManager :: Lens' KinesisKit Manager Source
A lens for _kkManager
.
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.
shardIsOpen :: Shard -> Bool Source
Miscellaneous monad stuff
mapError :: MonadError e' m => (e -> e') -> EitherT e m a -> m a Source
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
.