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.
|
2023-04-27 12:17:26 +02:00
|
|
|
Send(ctx context.Context, alerts []Alert, notifierHeaders map[string]string) error
|
2021-08-31 11:28:02 +02:00
|
|
|
// Addr returns address where alerts are sent.
|
|
|
|
Addr() string
|
2022-02-02 13:11:41 +01:00
|
|
|
// Close is a destructor for the Notifier
|
|
|
|
Close()
|
2020-04-06 13:44:03 +02:00
|
|
|
}
|