feat: gamemaster
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package ports
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"galaxy/notificationintent"
|
||||
)
|
||||
|
||||
//go:generate go run go.uber.org/mock/mockgen -destination=../adapters/mocks/mock_notificationpublisher.go -package=mocks galaxy/gamemaster/internal/ports NotificationIntentPublisher
|
||||
|
||||
// NotificationIntentPublisher is the producer port Game Master uses to
|
||||
// publish notification intents to Notification Service. The production
|
||||
// adapter is a thin wrapper around `notificationintent.Publisher`.
|
||||
//
|
||||
// A failed Publish call is a notification degradation per
|
||||
// `galaxy/gamemaster/README.md §Notification Contracts` and must not
|
||||
// roll back already committed runtime state. Callers log the error
|
||||
// and proceed.
|
||||
type NotificationIntentPublisher interface {
|
||||
// Publish normalises intent and appends it to the configured
|
||||
// Redis Stream. Validation failures and transport errors are
|
||||
// returned verbatim.
|
||||
Publish(ctx context.Context, intent notificationintent.Intent) error
|
||||
}
|
||||
Reference in New Issue
Block a user