grafana/pkg/services/ngalert/notifier/silences.go
Santiago 73be9449d1
Alerting: Manage remote Alertmanager silences (#75452)
* Alerting: Manage remote Alertmanager silences

* fix typo

* check errors when encoding json in fake external AM

* take path from configured URL, check for nil responses
2023-10-02 07:36:11 -03: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.CreateSilence(ps)
}
func (am *alertmanager) DeleteSilence(_ context.Context, silenceID string) error {
return am.Base.DeleteSilence(silenceID)
}