Documentation
¶
Overview ¶
Package notification provides outbound notification dispatching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type config.NotificationEvent `json:"type"`
AgentName string `json:"agent_name"`
TaskID string `json:"task_id,omitempty"`
Status string `json:"status"`
Result string `json:"result,omitempty"`
Error string `json:"error,omitempty"`
Timestamp time.Time `json:"timestamp"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Event represents a notification event with context data.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier dispatches notifications for agent events.
func New ¶
func New(cfg *config.AppConfig, metrics *observability.Metrics) *Notifier
New creates a new Notifier from configuration.
func (*Notifier) Notify ¶
Notify dispatches notifications for an event. This should be called from agent callbacks or runner hooks.
func (*Notifier) NotifyTaskCompleted ¶
NotifyTaskCompleted is a convenience method for task completion events.
func (*Notifier) NotifyTaskFailed ¶
NotifyTaskFailed is a convenience method for task failure events.
func (*Notifier) NotifyTaskStarted ¶
NotifyTaskStarted is a convenience method for task start events.
Click to show internal directories.
Click to hide internal directories.