mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-17 15:43:03 +00:00
refactor(eventstore): rename EventPusher to Command, EventReader to Event, PushEvents to Push and FilterEvents to Filter (#2907)
This commit is contained in:
@@ -23,7 +23,7 @@ type Update func(context.Context, []*Statement, Reduce) (unexecutedStmts []*Stat
|
||||
|
||||
//Reduce reduces the given event to a statement
|
||||
//which is used to update the projection
|
||||
type Reduce func(eventstore.EventReader) (*Statement, error)
|
||||
type Reduce func(eventstore.Event) (*Statement, error)
|
||||
|
||||
//Lock is used for mutex handling if needed on the projection
|
||||
type Lock func(context.Context, time.Duration) <-chan error
|
||||
@@ -156,7 +156,7 @@ func (h *ProjectionHandler) Process(
|
||||
|
||||
func (h *ProjectionHandler) processEvent(
|
||||
ctx context.Context,
|
||||
event eventstore.EventReader,
|
||||
event eventstore.Event,
|
||||
reduce Reduce,
|
||||
) error {
|
||||
stmt, err := reduce(event)
|
||||
@@ -262,7 +262,7 @@ func (h *ProjectionHandler) fetchBulkStmts(
|
||||
return false, err
|
||||
}
|
||||
|
||||
events, err := h.Eventstore.FilterEvents(ctx, eventQuery)
|
||||
events, err := h.Eventstore.Filter(ctx, eventQuery)
|
||||
if err != nil {
|
||||
logging.LogWithFields("HANDL-X8vlo", "projection", h.ProjectionName).WithError(err).Info("Unable to bulk fetch events")
|
||||
return false, err
|
||||
|
Reference in New Issue
Block a user