hydra-node-0.22.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Events.Rotation

Synopsis

Documentation

data EventStore e m Source #

An EventSource and EventSink combined

Constructors

EventStore 

Fields

newRotatedEventStore Source #

Arguments

:: (HasEventId e, MonadSTM m, MonadUnliftIO m, MonadTime m) 
=> RotationConfig 
-> s

Starting state of aggregate

-> (s -> e -> s)

Update aggregate state

-> (s -> EventId -> UTCTime -> e)

Create a checkpoint event

-> EventStore e m 
-> m (EventStore e m) 

Creates an event store that rotates according to given config and StateAggregate.