RequestBlock
Constructors
Signature
declare const empty: RequestBlock Since v2.0.0 Source
Signature
declare const mapRequestResolvers: <A>(self: RequestBlock, f: (dataSource: RequestResolver.RequestResolver<A>) => RequestResolver.RequestResolver<A>) => RequestBlockSignature
declare const parallel: (self: RequestBlock, that: RequestBlock) => RequestBlockSignature
declare const reduce: <Z>(self: RequestBlock, reducer: RequestBlock.Reducer<Z>) => Z Since v2.0.0 Source
Signature
declare const sequential: (self: RequestBlock, that: RequestBlock) => RequestBlockSignature
declare const single: <A>(dataSource: RequestResolver.RequestResolver<A>, blockedRequest: Request.Entry<A>) => RequestBlockModels
Signature
interface Empty { readonly _tag: "Empty";}Signature
interface Par { readonly _tag: "Par"; readonly left: RequestBlock; readonly right: RequestBlock;} Since v2.0.0 Source
RequestBlock
type Since v2.0.0 Source
RequestBlock captures a collection of blocked requests as a data
structure. By doing this the library is able to preserve information about
which requests must be performed sequentially and which can be performed in
parallel, allowing for maximum possible batching and pipelining while
preserving ordering guarantees.
Signature
type RequestBlock = Empty | Par | Seq | SingleSignature
interface Seq { readonly _tag: "Seq"; readonly left: RequestBlock; readonly right: RequestBlock;}Signature
interface Single { readonly _tag: "Single"; readonly blockedRequest: Entry<unknown>; readonly dataSource: RequestResolver<unknown>;}