Safe Haskell  None 

Language  Haskell2010 
Synopsis
 constantBlockFetchReceiver :: Functor m => (block > m ()) > m () > BlockFetchReceiver block m
 blockFetchClientMap :: forall block point (m :: Type > Type). MonadSTM m => [ChainRange point] > BlockFetchClient block point m [block]
 blockFetchClientPipelinedMax :: forall block point (m :: Type > Type). Monad m => [ChainRange point] > BlockFetchClientPipelined block point m [Either (ChainRange point) [block]]
 blockFetchClientPipelinedMin :: forall block point (m :: Type > Type). Monad m => [ChainRange point] > BlockFetchClientPipelined block point m [Either (ChainRange point) [block]]
 blockFetchClientPipelinedLimited :: forall block point (m :: Type > Type). Monad m => Int > [ChainRange point] > BlockFetchClientPipelined block point m [Either (ChainRange point) [block]]
 newtype RangeRequests (m :: Type > Type) block = RangeRequests {
 runRangeRequest :: ChainRange (Point block) > Producer block m (RangeRequests m block)
 constantRangeRequests :: forall (m :: Type > Type) block. Monad m => (ChainRange (Point block) > Producer block m ()) > RangeRequests m block
 rangeRequestsFromChain :: forall (m :: Type > Type) block. (Monad m, HasHeader block) => Chain block > RangeRequests m block
 blockFetchServer :: forall (m :: Type > Type) block. Monad m => RangeRequests m block > BlockFetchServer block (Point block) m ()
Documentation
constantBlockFetchReceiver Source #
:: Functor m  
=> (block > m ())  handle block 
> m ()  handle 
> BlockFetchReceiver block m 
blockFetchClientMap :: forall block point (m :: Type > Type). MonadSTM m => [ChainRange point] > BlockFetchClient block point m [block] Source #
A
designed for testing, which accumulates incoming
blocks in a BlockFetchClient
, which is read on termination.StrictTVar
Returns a list of bodies received from the server, from the newest to oldest.
blockFetchClientPipelinedMax :: forall block point (m :: Type > Type). Monad m => [ChainRange point] > BlockFetchClientPipelined block point m [Either (ChainRange point) [block]] Source #
A pipelined blockfetch client which sends eagerly a list of requests. This presents maximum pipelining and presents minmimum choice to the environment (drivers).
It returns the interleaving of `ChainRange point` requests and list of received block bodies in the order from newest to oldest (received block bodies are also ordered in this way).
blockFetchClientPipelinedMin :: forall block point (m :: Type > Type). Monad m => [ChainRange point] > BlockFetchClientPipelined block point m [Either (ChainRange point) [block]] Source #
A pipelined blockfetch client that sends eagerly but always tries to collect any replies as soon as they are available. This keeps pipelining to bare minimum, and gives maximum choice to the environment (drivers).
It returns the interleaving of `ChainRange point` requests and list of received block bodies in the order from newest to oldest (received block bodies are also ordered in this way).
blockFetchClientPipelinedLimited :: forall block point (m :: Type > Type). Monad m => Int > [ChainRange point] > BlockFetchClientPipelined block point m [Either (ChainRange point) [block]] Source #
A pipelined blockfetch client that sends eagerly up to some maximum limit of outstanding requests. It is also always ready to collect any replies if they are available. This allows limited pipelining and correspondingly limited choice to the environment (drivers).
It returns the interleaving of `ChainRange point` requests and list of received block bodies in the order from newest to oldest (received block bodies are also ordered in this way).
newtype RangeRequests (m :: Type > Type) block Source #
A recursive control data type which encodes a succession of
requests.ChainRange
block
RangeRequests  

constantRangeRequests :: forall (m :: Type > Type) block. Monad m => (ChainRange (Point block) > Producer block m ()) > RangeRequests m block Source #
A constant
object.RangeRequests
rangeRequestsFromChain :: forall (m :: Type > Type) block. (Monad m, HasHeader block) => Chain block > RangeRequests m block Source #
RangeRequests
which requests blocks from a chain. Use
instance of Functor
to change map RangeRequests
.block
blockFetchServer :: forall (m :: Type > Type) block. Monad m => RangeRequests m block > BlockFetchServer block (Point block) m () Source #
Construct a
from a BlockFetchServer
control data type.RangeRequest