conduit-throttle-0.3.0.0: 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 o -> ConduitM () o m () -> ConduitM () o m () 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.