Documentation
¶
Overview ¶
Package publish turns a matched task event into a notification-publish command and sends it into the shared notification core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCommand ¶
func BuildCommand( ctx context.Context, event TaskEvent, ) (notification.NotificationPublishCommand, error)
BuildCommand builds the notification-publish command for one matched task event.
The command is typed agent-escalation and carries no target: the deployed routing table owns the channel decision, and a non-nil target would override it. Nothing is sent and nothing is validated here; the caller validates before sending.
Types ¶
type Publisher ¶
Publisher publishes one notification per matched task event, suppressing repeats of the same task and phase inside its window.
func NewPublisher ¶
func NewPublisher( sender notification.NotificationPublishCommandSender, topicPrefix base.TopicPrefix, dedupTTL time.Duration, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) Publisher
NewPublisher returns a Publisher that publishes through sender and keeps its own dedup window (one instance per watcher entry, using that entry's TTL). The window is measured on currentDateTimeGetter, so expiry is testable without sleeping.