| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Haxl.Core.RequestStore
Description
Bucketing requests by DataSource.
When a request is issued by the client via dataFetch, it is placed
in the RequestStore. When we are ready to fetch the current batch
of requests, the contents operation extracts the fetches, bucketed
by DataSource.
This module is provided for access to Haxl internals only; most users should not need to import it.
Synopsis
- data BlockedFetches u = DataSource u r => BlockedFetches [BlockedFetch r]
- data RequestStore u
- isEmpty :: RequestStore u -> Bool
- noRequests :: RequestStore u
- addRequest :: forall u r. DataSource u r => BlockedFetch r -> RequestStore u -> RequestStore u
- contents :: RequestStore u -> [BlockedFetches u]
- newtype ReqCountMap = ReqCountMap (Map Text (Map TypeRep Int))
- emptyReqCounts :: ReqCountMap
- filterRCMap :: ReqCountMap -> ReqCountMap
- getMapFromRCMap :: ReqCountMap -> Map Text (Map TypeRep Int)
- addToCountMap :: forall (r :: * -> *). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap
- subFromCountMap :: forall (r :: * -> *). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap
Documentation
data BlockedFetches u Source #
A batch of BlockedFetch objects for a single DataSource
Constructors
| DataSource u r => BlockedFetches [BlockedFetch r] |
data RequestStore u Source #
A container for multiple BlockedFetch objects.
isEmpty :: RequestStore u -> Bool Source #
noRequests :: RequestStore u Source #
A new empty RequestStore.
addRequest :: forall u r. DataSource u r => BlockedFetch r -> RequestStore u -> RequestStore u Source #
Adds a BlockedFetch to a RequestStore.
contents :: RequestStore u -> [BlockedFetches u] Source #
Retrieves the whole contents of the RequestStore.
newtype ReqCountMap Source #
Instances
| Show ReqCountMap Source # | |
Defined in Haxl.Core.RequestStore Methods showsPrec :: Int -> ReqCountMap -> ShowS # show :: ReqCountMap -> String # showList :: [ReqCountMap] -> ShowS # | |
filterRCMap :: ReqCountMap -> ReqCountMap Source #
getMapFromRCMap :: ReqCountMap -> Map Text (Map TypeRep Int) Source #
addToCountMap :: forall (r :: * -> *). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap Source #
subFromCountMap :: forall (r :: * -> *). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap Source #