glue-0.2.0: Make better services.

Safe HaskellNone
LanguageHaskell2010

Glue.Batcher

Description

Module for creating a service that batches calls across requests.

Synopsis

Documentation

data BatchingOptions Source

Options for configuring the batching.

batchingService Source

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.