hw-kafka-conduit-1.1.0: Conduit bindings for kafka-client

Safe HaskellSafe
LanguageHaskell2010

Kafka.Conduit.Utils

Synopsis

Documentation

throwLeft :: (MonadThrow m, Exception e) => Conduit (Either e i) m i Source #

Throws the left part of a value in a MonadThrow context

foldYield :: Monad m => (i -> s -> (s, [o])) -> (s -> [o]) -> s -> Conduit i m o Source #

Create a conduit that folds with the function f over its input i with its internal state s and emits outputs [o], then finally emits outputs [o] from the function g applied to the final state s.