feat: game lobby service

This commit is contained in:
Ilia Denisov
2026-04-25 23:20:55 +02:00
committed by GitHub
parent 32dc29359a
commit 48b0056b49
336 changed files with 57074 additions and 1418 deletions
+22
View File
@@ -0,0 +1,22 @@
package ports
import (
"context"
"galaxy/notificationintent"
)
// IntentPublisher is the lobby-facing producer port for normalized
// notification intents. The production adapter is a
// *notificationintent.Publisher which already satisfies this interface;
// service tests use an in-process stub that records every Publish call.
//
// A failed Publish call is a notification degradation per
// lobby/README.md §Notification Contracts and must not roll back already
// committed business state. Callers log the error and proceed.
type IntentPublisher interface {
// Publish normalizes intent and appends it to the configured Redis
// Stream, returning the stream entry id on success. Validation
// failures and transport errors are returned verbatim.
Publish(ctx context.Context, intent notificationintent.Intent) (string, error)
}