package service import ( "github.com/prometheus/alertmanager/notify/webhook" "gitlab.wodcloud.com/smart-operation/so-operation-api/src/bean/entity" "xorm.io/xorm" ) type AlertWebhookSvc struct { User entity.SystemUserInfo } // TODO AlertManager 回调接口 func (a *AlertWebhookSvc) AlertWebhook(session *xorm.Session, req webhook.Message) (id string, err error) { // 1.判断该opensearch数据是否恢复 // 1.1.如果恢复,则查询当前opensearch最大id值,插入新的数据到预警列表 // 1.2如果未恢复,根据id更新该条数据 return }