eventful-core-0.2.0: Core module for eventful

Safe HaskellNone




synchronousEventBusWrapper :: Monad m => EventStoreWriter m event -> [EventStoreWriter m event -> UUID -> event -> m ()] -> EventStoreWriter m event Source #

This function wraps an event store by sending events to event handlers after running storeEvents. This is useful to quickly wire up event handlers in your application (like read models or process managers), and it is also useful for integration testing along with an in-memory event store.

storeAndPublishEvents :: Monad m => EventStoreWriter m event -> [UUID -> event -> m ()] -> ExpectedVersion -> UUID -> [event] -> m (Maybe EventWriteError) Source #

Stores events in the store and them publishes them to the event handlers. This is used in the synchronousEventBusWrapper.