Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data NextItem blk
- = NoMoreItems
- | NextItem blk
- newtype StreamAPI m blk a = StreamAPI {
- streamAfter ∷ ∀ b. HasCallStack ⇒ Point blk → (Either (RealPoint blk) (m (NextItem a)) → m b) → m b
- streamAPI ∷ (IOLike m, HasHeader blk) ⇒ ImmutableDB m blk → StreamAPI m blk blk
- streamAPI' ∷ ∀ m blk a. (IOLike m, HasHeader blk) ⇒ (a → m (NextItem a)) → BlockComponent blk a → ImmutableDB m blk → StreamAPI m blk a
- streamAll ∷ ∀ m blk e b a. (Monad m, HasCallStack) ⇒ StreamAPI m blk b → Point blk → (RealPoint blk → e) → a → (b → a → m a) → ExceptT e m a
Documentation
newtype StreamAPI m blk a Source #
Stream items from the immutable DB
When we initialize the ledger DB, we try to find a snapshot close to the tip of the immutable DB, and then stream blocks from the immutable DB to its tip to bring the ledger up to date with the tip of the immutable DB.
In CPS form to enable the use of withXYZ
style iterator init functions.
StreamAPI | |
|
∷ ∀ m blk a. (IOLike m, HasHeader blk) | |
⇒ (a → m (NextItem a)) | Stop condition |
→ BlockComponent blk a | |
→ ImmutableDB m blk | |
→ StreamAPI m blk a |