cqrs-core-0.10.0: Command-Query Responsibility Segregation

Safe HaskellNone
LanguageHaskell2010

Data.CQRS.Repository

Contents

Synopsis

Repository

data Repository a e Source

Repository consisting of an event store and an event bus.

newRepository :: (Show e, NFData e) => Settings -> AggregateAction a e -> EventStore e -> SnapshotStore a -> ((UUID, [PersistedEvent e]) -> IO r) -> IO UUID -> Repository a e Source

Create a repository from a pool of event store backends.

Settings

data Settings Source

Repository settings

setSnapshotFrequency :: Int -> Settings -> Settings Source

Set the snapshot frequency. 0 or negative means that no snapshots will be written. Any existing snapshots will still be used.

defaultSettings :: Settings Source

Default repository settings:

  • There are no snapshot by default