Files
grafana/pkg/services/ngalert/remote/compat.go
T
Yuri Tseretyan 4bb6926eee Alerting: Separate configuration model for remote Alertmanager Mimir client (#107741)
* replace PostableUserConfig with GrafanaAlertmanagerConfig to decouple from internal Grafana models
* update alertmanager + tests
* calculate hash of the GrafanaAlertmanagerConfig
2025-07-09 12:42:10 -04:00

14 lines
436 B
Go

package remote
import (
"github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
"github.com/grafana/grafana/pkg/services/ngalert/remote/client"
)
func PostableUserConfigToGrafanaAlertmanagerConfig(config *definitions.PostableUserConfig) *client.GrafanaAlertmanagerConfig {
return &client.GrafanaAlertmanagerConfig{
TemplateFiles: config.TemplateFiles,
AlertmanagerConfig: config.AlertmanagerConfig,
}
}