Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebHookHandler ¶
type WebHookHandler struct {
// contains filtered or unexported fields
}
WebHookHandler 负责处理Webhook相关的HTTP请求
func NewWebHookHandler ¶
func NewWebHookHandler(l *zap.Logger, dao dao.WebhookDao, alertQueue chan template.Alert) *WebHookHandler
NewWebHookHandler 创建一个新的WebHookHandler实例,并启动告警处理工作者
func (*WebHookHandler) MonitorAlertReceive ¶
func (w *WebHookHandler) MonitorAlertReceive(ctx *gin.Context)
MonitorAlertReceive 处理来自Alertmanager的告警接收请求
func (*WebHookHandler) MonitorAlertSilence ¶
func (w *WebHookHandler) MonitorAlertSilence(ctx *gin.Context)
MonitorAlertSilence 处理静默告警的请求
func (*WebHookHandler) MonitorAlertUnSilence ¶
func (w *WebHookHandler) MonitorAlertUnSilence(ctx *gin.Context)
MonitorAlertUnSilence 处理取消静默告警的请求
func (*WebHookHandler) RegisterRouters ¶
func (w *WebHookHandler) RegisterRouters(server *gin.Engine)
RegisterRouters 注册Webhook相关的HTTP路由
Click to show internal directories.
Click to hide internal directories.