VictoriaMetrics/app/vmalert/notifier/notifier.go

16 lines
428 B
Go
Raw Normal View History

2020-04-27 21:19:27 +00:00
package notifier
import "context"
// Notifier is a common interface for alert manager provider
2020-04-27 21:19:27 +00:00
type Notifier interface {
// Send sends the given list of alerts.
// Returns an error if fails to send the alerts.
// Must unblock if the given ctx is cancelled.
Send(ctx context.Context, alerts []Alert) error
// Addr returns address where alerts are sent.
Addr() string
// Close is a destructor for the Notifier
Close()
2020-04-27 21:19:27 +00:00
}