Alerting: Use interfaces for the Alertmanager (#73900)

This commit is contained in:
Santiago
2023-09-06 07:59:29 -03:00
committed by GitHub
parent f8026463a8
commit 93b9f9b537
12 changed files with 82 additions and 61 deletions

View File

@@ -4,18 +4,18 @@ import (
alertingNotify "github.com/grafana/alerting/notify"
)
func (am *Alertmanager) ListSilences(filter []string) (alertingNotify.GettableSilences, error) {
func (am *alertmanager) ListSilences(filter []string) (alertingNotify.GettableSilences, error) {
return am.Base.ListSilences(filter)
}
func (am *Alertmanager) GetSilence(silenceID string) (alertingNotify.GettableSilence, error) {
func (am *alertmanager) GetSilence(silenceID string) (alertingNotify.GettableSilence, error) {
return am.Base.GetSilence(silenceID)
}
func (am *Alertmanager) CreateSilence(ps *alertingNotify.PostableSilence) (string, error) {
func (am *alertmanager) CreateSilence(ps *alertingNotify.PostableSilence) (string, error) {
return am.Base.CreateSilence(ps)
}
func (am *Alertmanager) DeleteSilence(silenceID string) error {
func (am *alertmanager) DeleteSilence(silenceID string) error {
return am.Base.DeleteSilence(silenceID)
}