Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Glue.Batcher
Description
Module for creating a service that batches calls across requests.
Synopsis
- data BatchingOptions
- batchingService :: (Eq a, Hashable a, MonadBaseControl IO m, Applicative m, MonadBaseControl IO n) => BatchingOptions -> MultiGetService m a b -> n (BasicService m a (Maybe b), MultiGetService m a b)
- defaultBatchingOptions :: BatchingOptions
- batchWindowMs :: BatchingOptions -> Int
Documentation
data BatchingOptions Source #
Options for configuring the batching.
Instances
Eq BatchingOptions Source # | |
Defined in Glue.Batcher Methods (==) :: BatchingOptions -> BatchingOptions -> Bool # (/=) :: BatchingOptions -> BatchingOptions -> Bool # | |
Show BatchingOptions Source # | |
Defined in Glue.Batcher Methods showsPrec :: Int -> BatchingOptions -> ShowS # show :: BatchingOptions -> String # showList :: [BatchingOptions] -> ShowS # |
Arguments
:: (Eq a, Hashable a, MonadBaseControl IO m, Applicative m, MonadBaseControl IO n) | |
=> BatchingOptions | Options to configure the batched service. |
-> MultiGetService m a b | Service around which to batch requests. |
-> n (BasicService m a (Maybe b), MultiGetService m a b) |
Function for constructing a batching service.
defaultBatchingOptions :: BatchingOptions Source #
Default instance of BatchingOptions
with a batching window of 10ms.
batchWindowMs :: BatchingOptions -> Int Source #
Window in milliseconds over which to batch.