- Update agent-ops project rules and roadmap files - Add proto-socket infrastructure communication rail milestone - Update Flutter pubspec.lock and contracts notes - Enhance core service: config, HTTP middleware, router - Add notification module improvements - Add protosocket internal package
33 lines
723 B
Go
33 lines
723 B
Go
package notification
|
|
|
|
import "context"
|
|
|
|
// TaskEventSink receives every task event so non-Mattermost consumers (e.g. the
|
|
// proto-socket broadcaster) can fan out task status changes.
|
|
type TaskEventSink interface {
|
|
HandleTaskEvent(context.Context, TaskEvent) error
|
|
}
|
|
|
|
type TaskNotification struct {
|
|
TaskID string
|
|
Title string
|
|
Status string
|
|
Message string
|
|
}
|
|
|
|
type TaskEventType string
|
|
|
|
const (
|
|
TaskEventRunning TaskEventType = "task.running"
|
|
TaskEventCompleted TaskEventType = "task.completed"
|
|
TaskEventFailed TaskEventType = "task.failed"
|
|
TaskEventCanceled TaskEventType = "task.canceled"
|
|
)
|
|
|
|
type TaskEvent struct {
|
|
Type TaskEventType
|
|
TaskID string
|
|
Title string
|
|
Status string
|
|
Message string
|
|
}
|