Files
crawlab/core/constants/notification.go
Marvin Zhang 7fe770ae9d feat: Update notification trigger patterns and add alert trigger
The code changes modify the notification constants and models to update the trigger patterns for tasks and nodes. Additionally, a new trigger for alerts is added to the constants. This change allows for more flexible matching of notification triggers.
2024-07-31 15:58:41 +08:00

22 lines
609 B
Go

package constants
const (
NotificationTriggerPatternTask = "^task"
NotificationTriggerPatternNode = "^node"
)
const (
NotificationTriggerTaskFinish = "task_finish"
NotificationTriggerTaskError = "task_error"
NotificationTriggerTaskEmptyResults = "task_empty_results"
NotificationTriggerNodeStatusChange = "node_status_change"
NotificationTriggerNodeOnline = "node_online"
NotificationTriggerNodeOffline = "node_offline"
NotificationTriggerAlert = "alert"
)
const (
NotificationTemplateModeRichText = "rich-text"
NotificationTemplateModeMarkdown = "markdown"
)