eventful-core-0.1.2: Core module for eventful

Safe HaskellNone
LanguageHaskell2010

Eventful.EventBus

Synopsis

Documentation

synchronousEventBusWrapper :: Monad m => EventStore serialized m -> [EventStore serialized m -> UUID -> serialized -> m ()] -> EventStore serialized m 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 => EventStore serialized m -> [UUID -> serialized -> m ()] -> ExpectedVersion -> UUID -> [serialized] -> m (Maybe EventWriteError) Source #

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