Documentation ¶
Index ¶
- func NewEventStoreRefreshMiddleware(esClient apiEs.EventStoreClient, refreshInterval time.Duration) es.EventHandlerMiddleware
- func NewEventStoreReplayMiddleware(esClient apiEs.EventStoreClient) es.EventHandlerMiddleware
- func NewLoggingEventHandler() *loggingEventHandler
- func NewProjectingEventHandler[T es.Projection](projector es.Projector[T], repository es.Repository[T]) es.EventHandler
- func NewReactorEventHandler(esClient apiEs.EventStoreClient, reactor es.Reactor) *reactorEventHandler
- type ProjectionOutdatedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventStoreRefreshMiddleware ¶
func NewEventStoreRefreshMiddleware(esClient apiEs.EventStoreClient, refreshInterval time.Duration) es.EventHandlerMiddleware
NewEventStoreRefreshMiddleware creates an EventHandler which automates periodic querying of the EventStore to keep up-to-date.
func NewEventStoreReplayMiddleware ¶
func NewEventStoreReplayMiddleware(esClient apiEs.EventStoreClient) es.EventHandlerMiddleware
NewEventStoreReplayMiddleware creates an EventHandler which automates querying the EventStore in case of gaps in AggregateVersion found in other EventHandlers later in the chain of EventHandlers.
func NewLoggingEventHandler ¶
func NewLoggingEventHandler() *loggingEventHandler
NewLoggingEventHandler creates an EventHandler which automates storing Events in the EventStore when a Logging has emitted any.
func NewProjectingEventHandler ¶
func NewProjectingEventHandler[T es.Projection](projector es.Projector[T], repository es.Repository[T]) es.EventHandler
NewProjectingEventHandler creates an EventHandler which applies incoming events on a Projector and updates the Repository accordingly.
func NewReactorEventHandler ¶
func NewReactorEventHandler(esClient apiEs.EventStoreClient, reactor es.Reactor) *reactorEventHandler
NewReactorEventHandler creates an EventHandler which automates storing Events in the EventStore when a Reactor has emitted any.
Types ¶
type ProjectionOutdatedError ¶
type ProjectionOutdatedError struct {
ProjectionVersion uint64
}
func (*ProjectionOutdatedError) Error ¶
func (e *ProjectionOutdatedError) Error() string