Copyright | 2018 DFINITY Stiftung |
---|---|
License | GPL-3 |
Maintainer | Enzo Haussecker <enzo@dfinity.org> |
Stability | Stable |
Safe Haskell | None |
Language | Haskell2010 |
A parallel download protocol.
Synopsis
- sourceRadixTree :: forall m database. MonadResource m => RadixDatabase (ConduitT () ByteString m) database => [Bool] -> Int -> BoundedChan RadixRoot -> RadixTree database -> RWLock -> ConduitT () ByteString m ()
- sinkRadixTree :: forall m database. MonadResource m => RadixDatabase (ConduitT ByteString Void m) database => RadixRoot -> BoundedChan RadixRoot -> RadixTree database -> RWLock -> ConduitT ByteString Void m (Either String (RadixTree database))
Combinators
:: MonadResource m | |
=> RadixDatabase (ConduitT () ByteString m) database | |
=> [Bool] | Bit mask. |
-> Int | LRU cache size in items. |
-> BoundedChan RadixRoot | Terminal state root producer. |
-> RadixTree database | Radix tree. |
-> RWLock | Radix database lock. |
-> ConduitT () ByteString m () |
Create a conduit from a radix tree.
:: MonadResource m | |
=> RadixDatabase (ConduitT ByteString Void m) database | |
=> RadixRoot | Target state root. |
-> BoundedChan RadixRoot | Terminal state root consumer. |
-> RadixTree database | Radix tree. |
-> RWLock | Radix database lock. |
-> ConduitT ByteString Void m (Either String (RadixTree database)) |
Create a radix tree from a conduit.