MCPcopy
hub / github.com/DNSControl/dnscontrol / Notifier

Interface Notifier

pkg/notifications/notifications.go:6–14  ·  view source on GitHub ↗

Notifier is a type that can send a notification.

Source from the content-addressed store, hash-verified

4
5// Notifier is a type that can send a notification.
6type Notifier interface {
7 // Notify will be called after a correction is performed.
8 // It will be given the correction's message, the result of executing it,
9 // and a flag for whether this is a preview or if it actually ran.
10 // If preview is true, err will always be nil.
11 Notify(domain, provider string, message string, err error, preview bool) error
12 // Done will be called exactly once after all notifications are done. This will allow "batched" notifiers to flush and send
13 Done()
14}
15
16// new notification types should add themselves to this array.
17var initers = []func(map[string]string) Notifier{}

Callers 5

pprintOrRunCorrectionsFunction · 0.65
NotifyMethod · 0.65
prunFunction · 0.65
DoneMethod · 0.65
flattener.jsFile · 0.65

Implementers 3

telegramNotifierpkg/notifications/telegram.go
teamsNotifierpkg/notifications/teams.go
slackNotifierpkg/notifications/slack.go

Calls

no outgoing calls

Tested by

no test coverage detected