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

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

Network.Nakadi.Types

Description

This module provides the Nakadi API Types.

Synopsis

Documentation

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

MonadNakadiBase IO IO Source # 

Methods

nakadiLiftBase :: IO a -> IO a Source #

MonadNakadiBase b m => MonadNakadiBase b (ResourceT m) Source # 

Methods

nakadiLiftBase :: b a -> ResourceT m a Source #

MonadNakadiBase b m => MonadNakadiBase b (NoLoggingT m) Source # 

Methods

nakadiLiftBase :: b a -> NoLoggingT m a Source #

MonadNakadiBase b m => MonadNakadiBase b (LoggingT m) Source # 

Methods

nakadiLiftBase :: b a -> LoggingT m a Source #

MonadNakadiBase b m => MonadNakadiBase b (StateT s m) Source # 

Methods

nakadiLiftBase :: b a -> StateT s m a Source #

MonadNakadiBase b m => MonadNakadiBase b (StateT s m) Source # 

Methods

nakadiLiftBase :: b a -> StateT s m a Source #

(MonadNakadiBase b m, Monoid w) => MonadNakadiBase b (WriterT w m) Source # 

Methods

nakadiLiftBase :: b a -> WriterT w m a Source #

(MonadNakadiBase b m, Monoid w) => MonadNakadiBase b (WriterT w m) Source # 

Methods

nakadiLiftBase :: b a -> WriterT w m a Source #

MonadNakadiBase b m => MonadNakadiBase b (NakadiT b m) Source #

MonadNakadiBase

Methods

nakadiLiftBase :: b a -> NakadiT b m a Source #

MonadNakadiBase b m => MonadNakadiBase b (ReaderT * r m) Source # 

Methods

nakadiLiftBase :: b a -> ReaderT * r m a Source #

Monad m => MonadNakadiBase (LoggingT (ReaderT * r m)) (LoggingT (ReaderT * r m)) Source # 

Methods

nakadiLiftBase :: LoggingT (ReaderT * r m) a -> LoggingT (ReaderT * r m) a Source #

Monad m => MonadNakadiBase (NakadiBaseT m) (NakadiBaseT m) Source # 
Monad m => MonadNakadiBase (ReaderT * r m) (ReaderT * r m) Source # 

Methods

nakadiLiftBase :: ReaderT * r m a -> ReaderT * r m a Source #

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

class HasNakadiConfig b r | r -> b where Source #

Minimal complete definition

nakadiConfig

Methods

nakadiConfig :: r -> Config b Source #

data NakadiT b m a Source #

The NakadiT type is just a specialized ReaderT monad.

Instances

(Monad b, MonadReader r m) => MonadReader r (NakadiT b m) Source #

MonadReader

Methods

ask :: NakadiT b m r #

local :: (r -> r) -> NakadiT b m a -> NakadiT b m a #

reader :: (r -> a) -> NakadiT b m a #

(Monad b, MonadState s m) => MonadState s (NakadiT b m) Source #

MonadState

Methods

get :: NakadiT b m s #

put :: s -> NakadiT b m () #

state :: (s -> (a, s)) -> NakadiT b m a #

(Monad m, MonadBase b' m) => MonadBase b' (NakadiT b m) Source #

MonadBase

Methods

liftBase :: b' α -> NakadiT b m α #

MonadBaseControl b' m => MonadBaseControl b' (NakadiT b m) Source #

MonadBaseControl

Associated Types

type StM (NakadiT b m :: * -> *) a :: * #

Methods

liftBaseWith :: (RunInBase (NakadiT b m) b' -> b' a) -> NakadiT b m a #

restoreM :: StM (NakadiT b m) a -> NakadiT b m a #

MonadNakadiBase b m => MonadNakadiBase b (NakadiT b m) Source #

MonadNakadiBase

Methods

nakadiLiftBase :: b a -> NakadiT b m a Source #

(MonadCatch m, MonadMask b, MonadNakadiBase b (NakadiT b m)) => MonadNakadi b (NakadiT b m) Source #

NakadiT

Methods

nakadiAsk :: NakadiT b m (Config b) Source #

MonadTrans (NakadiT b) Source #

MonadTrans

Methods

lift :: Monad m => m a -> NakadiT b m a #

MonadTransControl (NakadiT b) Source #

MonadTransControl

Associated Types

type StT (NakadiT b :: (* -> *) -> * -> *) a :: * #

Methods

liftWith :: Monad m => (Run (NakadiT b) -> m a) -> NakadiT b m a #

restoreT :: Monad m => m (StT (NakadiT b) a) -> NakadiT b m a #

Monad m => Monad (NakadiT b m) Source #

Monad

Methods

(>>=) :: NakadiT b m a -> (a -> NakadiT b m b) -> NakadiT b m b #

(>>) :: NakadiT b m a -> NakadiT b m b -> NakadiT b m b #

return :: a -> NakadiT b m a #

fail :: String -> NakadiT b m a #

Functor m => Functor (NakadiT b m) Source #

Functor for NakadiT.

Methods

fmap :: (a -> b) -> NakadiT b m a -> NakadiT b m b #

(<$) :: a -> NakadiT b m b -> NakadiT b m a #

Applicative m => Applicative (NakadiT b m) Source #

Applicative for NakadiT.

Methods

pure :: a -> NakadiT b m a #

(<*>) :: NakadiT b m (a -> b) -> NakadiT b m a -> NakadiT b m b #

liftA2 :: (a -> b -> c) -> NakadiT b m a -> NakadiT b m b -> NakadiT b m c #

(*>) :: NakadiT b m a -> NakadiT b m b -> NakadiT b m b #

(<*) :: NakadiT b m a -> NakadiT b m b -> NakadiT b m a #

(Monad b, MonadIO m) => MonadIO (NakadiT b m) Source #

MonadIO

Methods

liftIO :: IO a -> NakadiT b m a #

(Monad b, MonadThrow m) => MonadThrow (NakadiT b m) Source #

MonadThrow

Methods

throwM :: Exception e => e -> NakadiT b m a #

(Monad b, MonadUnliftIO m) => MonadUnliftIO (NakadiT b m) Source #

MonadUnliftIO

Methods

askUnliftIO :: NakadiT b m (UnliftIO (NakadiT b m)) #

withRunInIO :: ((forall a. NakadiT b m a -> IO a) -> IO b) -> NakadiT b m b #

(Monad b, MonadCatch m) => MonadCatch (NakadiT b m) Source #

MonadCatch

Methods

catch :: Exception e => NakadiT b m a -> (e -> NakadiT b m a) -> NakadiT b m a #

(Monad b, MonadMask m) => MonadMask (NakadiT b m) Source #

MonadMask

Methods

mask :: ((forall a. NakadiT b m a -> NakadiT b m a) -> NakadiT b m b) -> NakadiT b m b #

uninterruptibleMask :: ((forall a. NakadiT b m a -> NakadiT b m a) -> NakadiT b m b) -> NakadiT b m b #

MonadLogger m => MonadLogger (NakadiT b m) Source #

MonadLogger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> NakadiT b m () #

(Monad b, MonadLoggerIO m) => MonadLoggerIO (NakadiT b m) Source #

MonadLoggerIO

Methods

askLoggerIO :: NakadiT b m (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

type StT (NakadiT b) a Source # 
type StT (NakadiT b) a = a
type StM (NakadiT b m) a Source # 
type StM (NakadiT b m) a = ComposeSt (NakadiT b) m a

runNakadiT :: Config b -> NakadiT b m a -> m a Source #