alarm_manager

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package alarm_manager

Package alarm_manager

Package alarm_manager

Package alarm_manager

Index

Constants

View Source
const (
	TopN         = 10
	AlarmManager = "[Alarm Manager]"
)

Variables

This section is empty.

Functions

func DeleteAlarm

func DeleteAlarm(id string) error

DeleteAlarm 根据告警id删除告警信息

Types

type Alarm

type Alarm struct {
	mgm.DefaultModel `bson:",inline"`
	Title            string `json:"title" bson:"title"`
	Level            string `json:"level" bson:"level"`
	Message          string `json:"message" bson:"message"`
}

func GetAlarmInfo

func GetAlarmInfo(id string) Alarm

func GetAllAlarm

func GetAllAlarm() []Alarm

GetAllAlarm 获取全部告警信息 按照时间排序 从新到旧

func GetTopNAlarm

func GetTopNAlarm() []Alarm

GetTopNAlarm 获取最新的10条告警

func (*Alarm) CollectionName

func (app *Alarm) CollectionName() string

Jump to

Keyboard shortcuts

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