26 lines
916 B
Go
26 lines
916 B
Go
package ports
|
|
|
|
import (
|
|
"context"
|
|
|
|
"galaxy/notificationintent"
|
|
)
|
|
|
|
// NotificationIntentPublisher is the producer port Runtime Manager uses
|
|
// to publish admin-only notification intents to Notification Service.
|
|
// The production adapter is a thin wrapper around
|
|
// `notificationintent.Publisher`; the wrapper drops the entry id
|
|
// returned by the underlying publisher because Runtime Manager does
|
|
// not track per-intent ids in v1.
|
|
//
|
|
// A failed Publish call is a notification degradation per
|
|
// `galaxy/rtmanager/README.md §Notification Contracts` and must not roll
|
|
// back already committed business 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
|
|
}
|