Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore
Contents
Description
See Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API for the documentation. This module just puts together the implementations for the API, currently two:
- Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.InMemory: a
TVar
holding a Data.Map. - Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.LMDB: an external disk-based database.
Synopsis
- module Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API
- newBackingStore ∷ Tracer m SomeBackendTrace → SomeBackendArgs m l → SnapshotsFS m → l EmptyMK → LedgerTables l ValuesMK → m (LedgerBackingStore m l)
- restoreBackingStore ∷ Tracer m SomeBackendTrace → SomeBackendArgs m l → SnapshotsFS m → l EmptyMK → FsPath → m (LedgerBackingStore m l)
- data SomeBackendTrace where
- SomeBackendTrace ∷ ∀ (m ∷ Type → Type) backend. Show (Trace m backend) ⇒ Trace m backend → SomeBackendTrace
- data SomeBackendArgs (m ∷ Type → Type) (l ∷ LedgerStateKind) where
- SomeBackendArgs ∷ ∀ (m ∷ Type → Type) backend (l ∷ LedgerStateKind). Backend m backend l ⇒ Args m backend → SomeBackendArgs m l
- class Backend (m ∷ Type → Type) backend (l ∷ LedgerStateKind) where
- data Args (m ∷ Type → Type) backend
- data Trace (m ∷ Type → Type) backend
- isRightBackendForSnapshot ∷ Proxy l → Args m backend → SnapshotBackend → Bool
- newBackingStoreInitialiser ∷ Tracer m SomeBackendTrace → Args m backend → SnapshotsFS m → BackingStoreInitialiser m l
API
Most of the documentation on the behaviour of the BackingStore
lives
in this module.
Initialization
newBackingStore ∷ Tracer m SomeBackendTrace → SomeBackendArgs m l → SnapshotsFS m → l EmptyMK → LedgerTables l ValuesMK → m (LedgerBackingStore m l) Source #
Create a BackingStore
from the given initial tables.
restoreBackingStore ∷ Tracer m SomeBackendTrace → SomeBackendArgs m l → SnapshotsFS m → l EmptyMK → FsPath → m (LedgerBackingStore m l) Source #
Overwrite the BackingStore
tables with the snapshot's tables
Tracing
data SomeBackendTrace where Source #
Constructors
SomeBackendTrace ∷ ∀ (m ∷ Type → Type) backend. Show (Trace m backend) ⇒ Trace m backend → SomeBackendTrace |
Instances
Show SomeBackendTrace Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore Methods showsPrec ∷ Int → SomeBackendTrace → ShowS # show ∷ SomeBackendTrace → String # showList ∷ [SomeBackendTrace] → ShowS # |
data SomeBackendArgs (m ∷ Type → Type) (l ∷ LedgerStateKind) where Source #
Constructors
SomeBackendArgs ∷ ∀ (m ∷ Type → Type) backend (l ∷ LedgerStateKind). Backend m backend l ⇒ Args m backend → SomeBackendArgs m l |
class Backend (m ∷ Type → Type) backend (l ∷ LedgerStateKind) where Source #
Methods
isRightBackendForSnapshot ∷ Proxy l → Args m backend → SnapshotBackend → Bool Source #
newBackingStoreInitialiser ∷ Tracer m SomeBackendTrace → Args m backend → SnapshotsFS m → BackingStoreInitialiser m l Source #