engine

package
v5.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventQueue = list.NewSafeListLimited(10000000)
View Source
var Workers = &WorkersType{rules: make(map[string]RuleEval)}

Functions

func Start

func Start(ctx context.Context) error

func StringSetKeys added in v5.4.0

func StringSetKeys(m map[string]struct{}) []string

Types

type Notice

type Notice struct {
	Event *models.AlertCurEvent `json:"event"`
	Tpls  map[string]string     `json:"tpls"`
}

type Notifier added in v5.5.0

type Notifier interface {
	Descript() string
	Notify([]byte)
}

type RuleEval

type RuleEval struct {
	// contains filtered or unexported fields
}

func (RuleEval) RuleID

func (r RuleEval) RuleID() int64

func (RuleEval) Start

func (r RuleEval) Start()

func (RuleEval) Stop

func (r RuleEval) Stop()

func (RuleEval) Work

func (r RuleEval) Work()

type TaskCreateReply

type TaskCreateReply struct {
	Err string `json:"err"`
	Dat int64  `json:"dat"` // task.id
}

type TaskForm

type TaskForm struct {
	Title     string   `json:"title"`
	Account   string   `json:"account"`
	Batch     int      `json:"batch"`
	Tolerance int      `json:"tolerance"`
	Timeout   int      `json:"timeout"`
	Pause     string   `json:"pause"`
	Script    string   `json:"script"`
	Args      string   `json:"args"`
	Action    string   `json:"action"`
	Creator   string   `json:"creator"`
	Hosts     []string `json:"hosts"`
}

type Vector

type Vector struct {
	Key       string       `json:"key"`
	Labels    model.Metric `json:"labels"`
	Timestamp int64        `json:"timestamp"`
	Value     float64      `json:"value"`
}

func ConvertVectors

func ConvertVectors(value model.Value) (lst []Vector)

type WorkersType

type WorkersType struct {
	// contains filtered or unexported fields
}

func (*WorkersType) Build

func (ws *WorkersType) Build(rids []int64)

Jump to

Keyboard shortcuts

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