conduit-throttle-0.2.0.1: Throttle Conduit Producers

Safe HaskellNone
LanguageHaskell2010

Data.Conduit.Throttle

Synopsis

Documentation

data Conf a Source #

setMeasure :: Measure a -> Conf a -> Conf a Source #

Set measure function in configuration.

setInterval :: Double -> Conf a -> Conf a Source #

Set interval in configuration.

setMaxThroughput :: Double -> Conf a -> Conf a Source #

Set max throughput in configuration.

setBufferSize :: Int -> Conf a -> Conf a Source #

Set buffer size in configuration.

setEmaAlpha :: Double -> Conf a -> Conf a Source #

Set exponential weight factor used for computing current item size.

throttleProducer :: (MonadUnliftIO m, MonadResource m) => Conf a -> Producer m a -> Producer m a Source #

Given a ThrottleConf and a Producer, create and return a new Producer, which yields the same stream of values like the provided producer but throttled according to the provided throttling configuration.