feat: gamemaster

This commit is contained in:
Ilia Denisov
2026-05-03 07:59:03 +02:00
committed by GitHub
parent a7cee15115
commit 3e2622757e
229 changed files with 41521 additions and 1098 deletions
@@ -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
}