Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.InMemory
Contents
Description
An implementation of a BackingStore
using a TVar. This is the
implementation known as "InMemory".
Synopsis
- newInMemoryBackingStore ∷ ∀ (l ∷ LedgerStateKind) m. (IOLike m, HasLedgerTables l, CanUpgradeLedgerTables l, SerializeTablesWithHint l) ⇒ Tracer m BackingStoreTrace → SnapshotsFS m → InitFrom (LedgerTables l ValuesMK) → m (LedgerBackingStore 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
- data family Args (m ∷ Type → Type) backend
- data InMemoryBackingStoreExn
- newtype InMemoryBackingStoreInitExn = StoreDirIsIncompatible FsErrorPath
Constructor
newInMemoryBackingStore ∷ ∀ (l ∷ LedgerStateKind) m. (IOLike m, HasLedgerTables l, CanUpgradeLedgerTables l, SerializeTablesWithHint l) ⇒ Tracer m BackingStoreTrace → SnapshotsFS m → InitFrom (LedgerTables l ValuesMK) → m (LedgerBackingStore m l) Source #
Use a TVar
as a trivial backing store
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 #
Errors
data InMemoryBackingStoreExn Source #
Errors that the InMemory backing store can throw on runtime.
WARNING: these errors will be thrown in IO as having a corrupt database is critical for the functioning of Consensus.
Constructors
Instances
Exception InMemoryBackingStoreExn Source # | |
Show InMemoryBackingStoreExn Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.InMemory |
newtype InMemoryBackingStoreInitExn Source #
Errors that the InMemory backing store can throw on initialization.
WARNING: these errors will be thrown in IO as having a corrupt database is critical for the functioning of Consensus.
Constructors
StoreDirIsIncompatible FsErrorPath |