grafana/pkg/services/ngalert/notifier/silences.go
Santiago 6a75a8f354
Alerting: Update grafana/alerting and use Upsert for creating silences (#85676)
* Alerting: Update grafana/alerting and use Upsert for creating silences

* go.work.sum

* change error message in tests for silences (save -> upsert)
2024-04-08 11:46:14 +02:00

24 lines
680 B
Go

package notifier
import (
"context"
alertingNotify "github.com/grafana/alerting/notify"
)
func (am *alertmanager) ListSilences(_ context.Context, filter []string) (alertingNotify.GettableSilences, error) {
return am.Base.ListSilences(filter)
}
func (am *alertmanager) GetSilence(_ context.Context, silenceID string) (alertingNotify.GettableSilence, error) {
return am.Base.GetSilence(silenceID)
}
func (am *alertmanager) CreateSilence(_ context.Context, ps *alertingNotify.PostableSilence) (string, error) {
return am.Base.UpsertSilence(ps)
}
func (am *alertmanager) DeleteSilence(_ context.Context, silenceID string) error {
return am.Base.DeleteSilence(silenceID)
}