nomadcode/services/core/internal/notification/model.go
toki e36db7281b feat: update project rules, roadmap, and core service changes
- 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
2026-05-30 19:32:48 +09:00

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
}