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

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

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

Radix 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

Radix database lock.

-> ConduitT ByteString Void m (Either String (RadixTree database)) 

Create a radix tree from a conduit.