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

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

Network.Nakadi.Prelude

Description

Convenience exports that should be fine to import unqualified.

Synopsis

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

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 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

data NakadiBaseT m a Source #

Instances

MonadTrans NakadiBaseT Source # 

Methods

lift :: Monad m => m a -> NakadiBaseT m a #

MonadReader r m => MonadReader r (NakadiBaseT m) Source # 

Methods

ask :: NakadiBaseT m r #

local :: (r -> r) -> NakadiBaseT m a -> NakadiBaseT m a #

reader :: (r -> a) -> NakadiBaseT m a #

MonadState s m => MonadState s (NakadiBaseT m) Source # 

Methods

get :: NakadiBaseT m s #

put :: s -> NakadiBaseT m () #

state :: (s -> (a, s)) -> NakadiBaseT m a #

MonadBase b m => MonadBase b (NakadiBaseT m) Source # 

Methods

liftBase :: b α -> NakadiBaseT m α #

MonadWriter w m => MonadWriter w (NakadiBaseT m) Source # 

Methods

writer :: (a, w) -> NakadiBaseT m a #

tell :: w -> NakadiBaseT m () #

listen :: NakadiBaseT m a -> NakadiBaseT m (a, w) #

pass :: NakadiBaseT m (a, w -> w) -> NakadiBaseT m a #

Monad m => Monad (NakadiBaseT m) Source # 

Methods

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

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

return :: a -> NakadiBaseT m a #

fail :: String -> NakadiBaseT m a #

Functor m => Functor (NakadiBaseT m) Source # 

Methods

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

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

Applicative m => Applicative (NakadiBaseT m) Source # 

Methods

pure :: a -> NakadiBaseT m a #

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

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

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

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

MonadIO m => MonadIO (NakadiBaseT m) Source # 

Methods

liftIO :: IO a -> NakadiBaseT m a #

MonadThrow m => MonadThrow (NakadiBaseT m) Source # 

Methods

throwM :: Exception e => e -> NakadiBaseT m a #

MonadCatch m => MonadCatch (NakadiBaseT m) Source # 

Methods

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

MonadMask m => MonadMask (NakadiBaseT m) Source # 

Methods

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

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

MonadLogger m => MonadLogger (NakadiBaseT m) Source # 

Methods

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

Monad m => MonadNakadiBase (NakadiBaseT m) (NakadiBaseT m) Source # 

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