cron

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrefixRecoveryTime = "/n9e/recovery/time/"
	PrefixAlertTime    = "/n9e/alert/time/"
	PrefixAlertUpgrade = "/n9e/alert/upgrade/"
)

Variables

This section is empty.

Functions

func CallbackConsumer

func CallbackConsumer()

func CheckJudge

func CheckJudge() error

func CheckJudgeLoop

func CheckJudgeLoop()

func CleanEvent

func CleanEvent()

func CleanEventLoop

func CleanEventLoop()

func CleanStra

func CleanStra()

定期清理没有找到nid的策略

func CleanStraLoop

func CleanStraLoop()

func EventConsumer

func EventConsumer()

func IsMaskEvent

func IsMaskEvent(event *model.Event) bool

func NeedCallback

func NeedCallback(sid int64) bool

func PopCallbackEvent

func PopCallbackEvent(queue string) *model.Event

func PushCallbackEvent

func PushCallbackEvent(event *model.Event) error

func SetEventStatus

func SetEventStatus(event *model.Event, status string)

func SyncMaskconf

func SyncMaskconf() error

func SyncMaskconfLoop

func SyncMaskconfLoop()

SyncMaskconfLoop 周期性同步屏蔽策略,频率是9秒一次,一般采集周期不会低于10秒

func SyncStra

func SyncStra() error

func SyncStraLoop

func SyncStraLoop()

Types

type CallbackEvent

type CallbackEvent struct {
	Id          int64               `json:"id"`
	Sid         int64               `json:"sid"`
	Sname       string              `json:"sname"`
	NodePath    string              `json:"node_path"`
	Nid         int64               `json:"nid"`
	Endpoint    string              `json:"endpoint"`
	Priority    int                 `json:"priority"`
	EventType   string              `json:"event_type"` // alert|recovery
	Category    int                 `json:"category"`
	Status      uint16              `json:"status"`
	HashId      uint64              `json:"hashid"  xorm:"hashid"`
	Etime       int64               `json:"etime"`
	Value       string              `json:"value"`
	Info        string              `json:"info"`
	LastUpdator string              `json:"last_updator"`
	Created     time.Time           `json:"created" xorm:"created"`
	Groups      []string            `json:"groups"`
	Users       []string            `json:"users"`
	Detail      []model.EventDetail `json:"detail"`
}

Jump to

Keyboard shortcuts

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