2020-04-27 21:19:27 +00:00
|
|
|
package notifier
|
|
|
|
|
2020-05-10 16:58:17 +00:00
|
|
|
import "context"
|
|
|
|
|
2021-08-31 09:28:02 +00:00
|
|
|
// Notifier is a common interface for alert manager provider
|
2020-04-27 21:19:27 +00:00
|
|
|
type Notifier interface {
|
2021-08-31 09:28:02 +00: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 10:17:26 +00:00
|
|
|
Send(ctx context.Context, alerts []Alert, notifierHeaders map[string]string) error
|
2021-08-31 09:28:02 +00:00
|
|
|
// Addr returns address where alerts are sent.
|
|
|
|
Addr() string
|
2022-02-02 12:11:41 +00:00
|
|
|
// Close is a destructor for the Notifier
|
|
|
|
Close()
|
2020-04-27 21:19:27 +00:00
|
|
|
}
|