fix(event handling): use internal pubsub for view update (#1118)

* start sub

* start implement subsciptions

* start subscription

* implementation for member done

* admin done

* fix: tests

* extend handlers

* prepary notification

* no errors in adminapi

* changed current sequence in all packages

* ignore mocks

* works

* subscriptions as singleton

* tests

* refactor: rename function scope var
This commit is contained in:
Silvan
2020-12-18 16:47:45 +01:00
committed by GitHub
parent e15fc0b92b
commit dd5e4acd24
160 changed files with 4010 additions and 1596 deletions
+15 -1
View File
@@ -24,6 +24,18 @@ type testHandler struct {
bulkLimit uint64
}
func (h *testHandler) AggregateTypes() []models.AggregateType {
return nil
}
func (h *testHandler) CurrentSequence(event *models.Event) (uint64, error) {
return 0, nil
}
func (h *testHandler) Eventstore() eventstore.Eventstore {
return nil
}
func (h *testHandler) ViewModel() string {
return h.viewModel
}
@@ -55,6 +67,8 @@ type eventstoreStub struct {
err error
}
func (es *eventstoreStub) Subscribe(...models.AggregateType) *eventstore.Subscription { return nil }
func (es *eventstoreStub) Health(ctx context.Context) error {
return nil
}
@@ -432,7 +446,7 @@ func TestHandleError(t *testing.T) {
func(*repository.FailedEvent) error {
return nil
},
func(uint64, time.Time) error {
func(*models.Event) error {
processedSequence = true
return nil
},