Message defines the JSON object send to webhook endpoints.
type Message struct { *template.Data // The protocol version. Version string `json:"version"` GroupKey string `json:"groupKey"` TruncatedAlerts uint64 `json:"truncatedAlerts"` }
Notifier implements a Notifier for generic webhooks.
type Notifier struct {
// contains filtered or unexported fields
}
func New(conf *config.WebhookConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error)
New returns a new Webhook.
func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, error)
Notify implements the Notifier interface.