Documentation
¶
Overview ¶
Package alert tells the operator that a source could not be synced or reloaded: an error line in the log, and a JSON POST to a webhook when one is configured.
Webhook body ¶
One JSON object: {"text":"arnakoff: AMF update failed: <error>", "source":"AMF","at":"<RFC 3339>","error":"<error>"}. text reads on its own in a chat channel; the other fields are for a machine. The error names the source and why, never a personal datum: connectors quote no value of the files they parse.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier logs each alert and posts it to a webhook. It implements app.Alerter and is safe for concurrent use.
func ForWebhook ¶
ForWebhook returns a Notifier logging to logger and posting to webhook, an HTTPS URL, through an HTTP client allowed to reach its host only. Its errors never quote webhook.