api

package
v0.0.0-...-94be13e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 15 Imported by: 0

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路由

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL