Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ArchiveRef
- data ArchiveMetadata = ArchiveMetadata {}
- data ArchiveStore e = ArchiveStore {
- asGetUnarchivedEventCount :: IO Int
- asArchiveEvents :: Int -> IO (Maybe UUID)
- asReadLatestArchiveMetadata :: IO (Maybe ArchiveMetadata)
- asReadArchiveMetadata :: UUID -> IO (Maybe ArchiveMetadata)
- asReadArchive :: forall a. ArchiveRef -> (InputStream (UUID, PersistedEvent e) -> IO a) -> IO a
- data StoreError = VersionConflict UUID
- applyIso :: forall e' e. (e' -> e, e -> e') -> ArchiveStore e -> ArchiveStore e'
- enumerateAllEvents :: ArchiveStore e -> (InputStream (UUID, PersistedEvent e) -> IO ()) -> IO ()
- rotateArchives :: ArchiveStore e -> Int -> IO ()
Documentation
data ArchiveMetadata Source
Archive metadata.
data ArchiveStore e Source
ArchiveStore for events of type e.
ArchiveStore | |
|
data StoreError Source
Errors that can happen during esStoreEvents
.
applyIso :: forall e' e. (e' -> e, e -> e') -> ArchiveStore e -> ArchiveStore e' Source
Transform an implementation of 'ArchiveStore a' to an implementation of 'ArchiveStore b' via an isomorphism. This can be used to add serialization/deserialization to event stores which do not support storing anything other than binary data.
enumerateAllEvents :: ArchiveStore e -> (InputStream (UUID, PersistedEvent e) -> IO ()) -> IO () Source
Enumerate all events in all archives. __This should ONLY be used for debugging purposes.__
rotateArchives :: ArchiveStore e -> Int -> IO () Source
Perform event archival until the current number of unarchived
events goes below the given archiveSize
. Does nothing if the
given archiveSize
is not a positive number.