Skip to content

Commit cbdc33e

Browse files
author
Christian Wygoda
committed
Standardize naming for NotificationQueue(r)
1 parent cc0a1f6 commit cbdc33e

File tree

5 files changed

+39
-38
lines changed

5 files changed

+39
-38
lines changed

driver/sql/projection_notification_processor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type (
1919
logger goengine.Logger
2020
metrics Metrics
2121

22-
notificationQueue NotificationQueueInterface
22+
notificationQueue NotificationQueuer
2323
}
2424

2525
// ProcessHandler is a func used to trigger a notification but with the addition of providing a Trigger func so
@@ -34,7 +34,7 @@ func NewBackgroundProcessor(
3434
logger goengine.Logger,
3535
metrics Metrics,
3636
retryDelay time.Duration,
37-
notificationQueue NotificationQueueInterface,
37+
notificationQueue NotificationQueuer,
3838
) (*ProjectionNotificationProcessor, error) {
3939
if queueProcessors <= 0 {
4040
return nil, errors.New("queueProcessors must be greater then zero")

driver/sql/projection_notification_processor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestStartProcessor(t *testing.T) {
5252
t.Run(testCase.title, func(t *testing.T) {
5353
ctrl := gomock.NewController(t)
5454

55-
nqMock := mocks.NewMockNotificationQueueInterface(ctrl)
55+
nqMock := mocks.NewNotificationQueuer(ctrl)
5656
ctx := context.Background()
5757
notification := testCase.notification()
5858

driver/sql/projection_notification_queue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ var _ ProjectionTrigger = (&NotificationQueue{}).Queue
1313
var _ ProjectionTrigger = (&NotificationQueue{}).ReQueue
1414

1515
type (
16-
// NotificationQueueInterface describes a smart queue for projection notifications
17-
NotificationQueueInterface interface {
16+
// NotificationQueuer describes a smart queue for projection notifications
17+
NotificationQueuer interface {
1818
Channel() chan *ProjectionNotification
1919
Close()
2020
Empty() bool

mocks/driver/sql/notification_queue.go

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mocks/mocks.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
//go:generate go run ../vendor/github.com/golang/mock/mockgen/ -package=sql -destination driver/sql/persistence_strategy.go -mock_names PersistenceStrategy=PersistenceStrategy github.com/hellofresh/goengine/driver/sql PersistenceStrategy
2323
//go:generate go run ../vendor/github.com/golang/mock/mockgen/ -package=sql -destination driver/sql/projection_state_serialization.go -mock_names ProjectionStateSerialization=ProjectionStateSerialization github.com/hellofresh/goengine/driver/sql ProjectionStateSerialization
2424
//go:generate go run ../vendor/github.com/golang/mock/mockgen/ -package=sql -destination driver/sql/message_factory.go -mock_names MessageFactory=MessageFactory github.com/hellofresh/goengine/driver/sql MessageFactory
25+
//go:generate go run ../vendor/github.com/golang/mock/mockgen/ -package sql -destination driver/sql/notification_queue.go -mock_names NotificationQueuer=NotificationQueuer github.com/hellofresh/goengine/driver/sql NotificationQueuer
2526

2627
var _ goengine.Message = &DummyMessage{}
2728

0 commit comments

Comments
 (0)