Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
IncidentID string
NotificationID string
CheckInName string
LastCheckIn time.Time
ExpectedBy time.Time
OverdueSince time.Time
AlertingAt time.Time
Now time.Time
Phase monitor.Phase
Status monitor.EventStatus
Resolved bool
Title string
Text string
App AppData
Receiver string
CustomData map[string]string
}
Data is the template context for check-in notifications.
type Event ¶
type Event struct {
MonitorEvent monitor.Event
Receivers []kit.ReceiverID
}
Event wraps a monitor event as a notifykit notification.
func NewEvent ¶
func NewEvent(monitorEvent monitor.Event, receivers []kit.ReceiverID) *Event
NewEvent constructs an Event notification.
func (*Event) ReceiverIDs ¶
func (e *Event) ReceiverIDs() []kit.ReceiverID
ReceiverIDs returns explicit receiver routing.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router owns notification receiver routing rules.
func NewRouter ¶
func NewRouter(resolvedReceivers []kit.ReceiverID) *Router
NewRouter creates a notification router.
func ReceiversFromConfig ¶
func ReceiversFromConfig(templateFS fs.FS, cfg config.Notifications, logger *slog.Logger) (kit.Receivers, *Router, error)
ReceiversFromConfig builds notifykit receivers and routing policy from Overdue notification config.
func (*Router) ReceiverIDsForEvent ¶
ReceiverIDsForEvent returns explicit receiver routing for an event.
Click to show internal directories.
Click to hide internal directories.