model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALERT_RULE          = "alert_rule.yaml"
	ANALYZER_EXPRESSION = "analyzer_expression.json"
	NOTIFY_TEMPLATE     = "notify_template.yaml"

	ZHLange = "zh-CN"
	ENLange = "en-US"
)

Variables

View Source
var WindowKeys = []int64{1, 3, 5, 10, 15, 30}

Functions

This section is empty.

Types

type AlertConfig

type AlertConfig struct {
	Id         string                 `json:"id" yaml:"id"`
	Name       string                 `json:"name" yaml:"name"`
	AlertScope string                 `json:"alert_scope" yaml:"alert_scope"`
	AlertType  string                 `json:"alert_type" yaml:"alert_type"`
	Attributes map[string]interface{} `json:"attributes" yaml:"attributes"`
}

type AlertRule

type AlertRule struct {
	ExpressionConfig *AlertConfig
	Expression       *Expression
	Template         []*NotifyTemplate
}

type Expression

type Expression struct {
	Id         string          `json:"id"`
	Expression jsonmap.JSONMap `json:"expression"`
	Attributes jsonmap.JSONMap `json:"attributes"`
}

type NotifyTemplate

type NotifyTemplate struct {
	Name       string                 `json:"name"`
	AlertType  string                 `json:"alert_type"`
	AlertIndex string                 `json:"alert_index"`
	Target     string                 `json:"target"`
	Trigger    string                 `json:"trigger"`
	Title      string                 `json:"title"`
	Template   string                 `json:"template"`
	Formats    map[string]interface{} `json:"formats"`
	Version    string                 `json:"version"`
	Language   string                 `json:"language"`
}

Jump to

Keyboard shortcuts

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