dfinity-radix-tree-0.3.0: A generic data integrity layer.

Copyright2018 DFINITY Stiftung
LicenseGPL-3
MaintainerEnzo Haussecker <enzo@dfinity.org>
StabilityStable
Safe HaskellNone
LanguageHaskell2010

Network.DFINITY.RadixTree.Conduit

Contents

Description

A parallel download protocol.

Synopsis

Combinators

sourceRadixTree Source #

Arguments

:: 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

Database lock.

-> ConduitT () ByteString m () 

Create a conduit from a radix tree.

sinkRadixTree Source #

Arguments

:: MonadResource m 
=> RadixDatabase (ConduitT ByteString Void m) database 
=> RadixRoot

Target state root.

-> BoundedChan RadixRoot

Terminal state root consumer.

-> RadixTree database

Radix tree.

-> RWLock

Database lock.

-> ConduitT ByteString Void m (Either [RadixRoot] (RadixTree database)) 

Create a radix tree from a conduit.