2020-04-06 13:44:03 +02:00
|
|
|
package notifier
|
|
|
|
|
2020-05-10 18:58:17 +02:00
|
|
|
import "context"
|
|
|
|
|
2021-08-31 11:28:02 +02:00
|
|
|
// Notifier is a common interface for alert manager provider
|
2020-04-06 13:44:03 +02:00
|
|
|
type Notifier interface {
|
2021-08-31 11:28:02 +02:00
|
|
|
// Send sends the given list of alerts.
|
|
|
|
// Returns an error if fails to send the alerts.
|
|
|
|
// Must unblock if the given ctx is cancelled.
|
2020-05-10 18:58:17 +02:00
|
|
|
Send(ctx context.Context, alerts []Alert) error
|
2021-08-31 11:28:02 +02:00
|
|
|
// Addr returns address where alerts are sent.
|
|
|
|
Addr() string
|
2020-04-06 13:44:03 +02:00
|
|
|
}
|