Copyright | (c) Moritz Clasmeier 2018 |
---|---|
License | BSD3 |
Maintainer | mtesseract@silverratio.net |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Network.Nakadi.Prelude
Description
Convenience exports that should be fine to import unqualified.
Synopsis
- class (MonadNakadiBase b m, MonadThrow b, MonadMask b, MonadThrow m, MonadCatch m) => MonadNakadi b m | m -> b where
- class (Monad b, Monad m) => MonadNakadiBase b m where
- class HasNakadiConfig b r | r -> b where
- data NakadiT b m a
- data NakadiBaseT m a
- data NakadiException
- runNakadiT :: Config b -> NakadiT b m a -> m a
- $sel:runNakadiBaseT:NakadiBaseT :: NakadiBaseT m a -> m a
Documentation
class (MonadNakadiBase b m, MonadThrow b, MonadMask b, MonadThrow m, MonadCatch m) => MonadNakadi b m | m -> b where Source #
The MonadNakadi
typeclass is implemented by monads in which
Nakadi can be called. The first parameter (b
) denotes the `base
monad`. This is the monad in which the core actions are run. This
includes executing (non-streaming) HTTP requests and running
user-provided callbacks. The typeclass provides methods for
* retrieving the Nakadi configuration
* locally changing the Nakadi configuration
* extracting specific Nakadi configuration values
* lifting actions from the
The MonadNakadi
typeclass is modelled closely after MonadReader
.
Methods
nakadiAsk :: m (Config b) Source #
nakadiAsk :: (MonadNakadi b n, MonadTrans t, m ~ t n) => m (Config b) Source #
Instances
MonadNakadi IO IO Source # | |
MonadNakadi b m => MonadNakadi b (ResourceT m) Source # | |
MonadNakadi b m => MonadNakadi b (NoLoggingT m) Source # | |
Defined in Network.Nakadi.Internal.Types Methods nakadiAsk :: NoLoggingT m (Config b) Source # | |
MonadNakadi b m => MonadNakadi b (LoggingT m) Source # | |
MonadNakadi b m => MonadNakadi b (StateT s m) Source # |
|
MonadNakadi b m => MonadNakadi b (StateT s m) Source # |
|
(MonadNakadi b m, Monoid w) => MonadNakadi b (WriterT w m) Source # |
|
(MonadNakadi b m, Monoid w) => MonadNakadi b (WriterT w m) Source # |
|
(MonadCatch m, MonadMask b, MonadNakadiBase b (NakadiT b m)) => MonadNakadi b (NakadiT b m) Source # | |
(MonadMask b, MonadCatch m, MonadNakadiBase b (ReaderT r m), HasNakadiConfig b r) => MonadNakadi b (ReaderT r m) Source # | |
class (Monad b, Monad m) => MonadNakadiBase b m where Source #
Methods
nakadiLiftBase :: b a -> m a Source #
nakadiLiftBase :: (MonadNakadiBase b n, MonadTrans t, m ~ t n) => b a -> m a Source #
Instances
class HasNakadiConfig b r | r -> b where Source #
Minimal complete definition
Methods
nakadiConfig :: r -> Config b Source #
Instances
data NakadiBaseT m a Source #
Instances
data NakadiException Source #
Instances
Show NakadiException Source # | |
Defined in Network.Nakadi.Internal.Types.Exceptions Methods showsPrec :: Int -> NakadiException -> ShowS # show :: NakadiException -> String # showList :: [NakadiException] -> ShowS # | |
Exception NakadiException Source # | |
Defined in Network.Nakadi.Internal.Types.Exceptions Methods toException :: NakadiException -> SomeException # |
runNakadiT :: Config b -> NakadiT b m a -> m a Source #
$sel:runNakadiBaseT:NakadiBaseT :: NakadiBaseT m a -> m a Source #