constant

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlertSeverityCritical AlertSeverity = "critical" // 严重
	AlertSeverityWarning  AlertSeverity = "warning"  // 警告
	AlertSeverityInfo     AlertSeverity = "info"     // 信息

	AlertStatusFiring   AlertStatus = "firing"   // 触发中
	AlertStatusResolved AlertStatus = "resolved" // 已恢复
)
View Source
const (
	SendGroupURLTemplate = "http://%s/%s?id=%v"                  // 发送组 URL 模板
	RenderingURLTemplate = "http://%s/%s?fingerprint=%v"         // 渲染 URL 模板
	SilenceURLTemplate   = "http://%s/%s?fingerprint=%v&hour=%v" // 静音 URL 模板
	UnsilenceURLTemplate = "http://%s/%s?fingerprint=%v"         // 取消静音 URL 模板

	// DefaultUpgradeMinutes 默认告警升级时间(分钟)
	DefaultUpgradeMinutes = 30 // 默认告警升级时间为30分钟
)

URL 模板常量

Variables

View Source
var (
	CardContent = `` /* 6276-byte string literal not displayed */

	CartDataGroup = `
{
    "msg_type": "interactive",
    "card": %s
}
`
)
View Source
var SeverityTitleColorMap = map[AlertSeverity]string{
	AlertSeverityCritical: "red",
	AlertSeverityWarning:  "yellow",
	AlertSeverityInfo:     "blue",
}

SeverityTitleColorMap 将告警严重性映射到标题颜色

View Source
var StatusChineseMap = map[AlertStatus]string{
	AlertStatusFiring:   "触发中",
	AlertStatusResolved: "已恢复",
}

StatusChineseMap 将告警状态映射到中文描述

View Source
var StatusColorMap = map[AlertStatus]string{
	AlertStatusFiring:   "red",
	AlertStatusResolved: "green",
}

StatusColorMap 将告警状态映射到颜色

Functions

This section is empty.

Types

type AlertSeverity

type AlertSeverity string

AlertSeverity 表示告警的严重性等级

type AlertStatus

type AlertStatus string

AlertStatus 表示告警的状态

Jump to

Keyboard shortcuts

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