MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / pushByConfigId

Function pushByConfigId

agent/utils/alert_push/alert_push.go:42–49  ·  view source on GitHub ↗
(alertRepo repo.IAlertRepo, alert dto.AlertDTO, pushAlert dto.PushAlert, configId uint)

Source from the content-addressed store, hash-verified

40}
41
42func pushByConfigId(alertRepo repo.IAlertRepo, alert dto.AlertDTO, pushAlert dto.PushAlert, configId uint) {
43 config, err := alertRepo.GetConfigById(configId)
44 if err != nil {
45 global.LOG.Errorf("alert config not found for id %d: %v", configId, err)
46 return
47 }
48 sendAlert(alertRepo, alert, pushAlert, config)
49}
50
51func pushByLegacyMethod(alertRepo repo.IAlertRepo, alert dto.AlertDTO, pushAlert dto.PushAlert, method string) {
52 typeMap := map[string]string{

Callers 1

PushAlertFunction · 0.85

Calls 2

sendAlertFunction · 0.85
GetConfigByIdMethod · 0.65

Tested by

no test coverage detected