Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BlockFetchServer block point m a where
- BlockFetchServer ∷ (ChainRange point → m (BlockFetchBlockSender block point m a)) → a → BlockFetchServer block point m a
- data BlockFetchBlockSender block point m a where
- SendMsgStartBatch ∷ m (BlockFetchSendBlocks block point m a) → BlockFetchBlockSender block point m a
- SendMsgNoBlocks ∷ m (BlockFetchServer block point m a) → BlockFetchBlockSender block point m a
- data BlockFetchSendBlocks block point m a where
- SendMsgBlock ∷ block → m (BlockFetchSendBlocks block point m a) → BlockFetchSendBlocks block point m a
- SendMsgBatchDone ∷ m (BlockFetchServer block point m a) → BlockFetchSendBlocks block point m a
- blockFetchServerPeer ∷ ∀ block point m a. Functor m ⇒ BlockFetchServer block point m a → Peer (BlockFetch block point) AsServer BFIdle m a
Documentation
data BlockFetchServer block point m a where Source #
BlockFetchServer ∷ (ChainRange point → m (BlockFetchBlockSender block point m a)) → a → BlockFetchServer block point m a |
data BlockFetchBlockSender block point m a where Source #
Send batches of blocks, when a batch is sent loop using
.BlockFetchServer
SendMsgStartBatch ∷ m (BlockFetchSendBlocks block point m a) → BlockFetchBlockSender block point m a | Initiate a batch of blocks. |
SendMsgNoBlocks ∷ m (BlockFetchServer block point m a) → BlockFetchBlockSender block point m a |
data BlockFetchSendBlocks block point m a where Source #
Stream batch of blocks
SendMsgBlock ∷ block → m (BlockFetchSendBlocks block point m a) → BlockFetchSendBlocks block point m a | Send a single block and recurse. |
SendMsgBatchDone ∷ m (BlockFetchServer block point m a) → BlockFetchSendBlocks block point m a | End of the stream of block bodies. |
blockFetchServerPeer ∷ ∀ block point m a. Functor m ⇒ BlockFetchServer block point m a → Peer (BlockFetch block point) AsServer BFIdle m a Source #