Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 = forall r.DataSource u r => BlockedFetches [BlockedFetch r] [BlockedFetchInternal]
- newtype BlockedFetchInternal = BlockedFetchInternal CallId
- data RequestStore u
- isEmpty :: RequestStore u -> Bool
- noRequests :: RequestStore u
- addRequest :: forall u r. DataSource u r => BlockedFetch r -> BlockedFetchInternal -> RequestStore u -> RequestStore u
- contents :: RequestStore u -> [BlockedFetches u]
- getSize :: RequestStore u -> Int
- newtype ReqCountMap = ReqCountMap (Map Text (Map TypeRep Int))
- emptyReqCounts :: ReqCountMap
- filterRCMap :: ReqCountMap -> ReqCountMap
- getMapFromRCMap :: ReqCountMap -> Map Text (Map TypeRep Int)
- getSummaryMapFromRCMap :: ReqCountMap -> HashMap Text Int
- addToCountMap :: forall (r :: Type -> Type). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap
- subFromCountMap :: forall (r :: Type -> Type). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap
Documentation
data BlockedFetches u Source #
A batch of BlockedFetch
objects for a single DataSource
forall r.DataSource u r => BlockedFetches [BlockedFetch r] [BlockedFetchInternal] |
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 -> BlockedFetchInternal -> RequestStore u -> RequestStore u Source #
Adds a BlockedFetch
to a RequestStore
.
contents :: RequestStore u -> [BlockedFetches u] Source #
Retrieves the whole contents of the RequestStore
.
getSize :: RequestStore u -> Int Source #
newtype ReqCountMap Source #
Instances
Show ReqCountMap Source # | |
Defined in Haxl.Core.RequestStore 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 :: Type -> Type). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap Source #
subFromCountMap :: forall (r :: Type -> Type). (DataSourceName r, Typeable r) => Proxy r -> Int -> ReqCountMap -> ReqCountMap Source #