alarmtag

package
v0.0.0-...-9b5cd94 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeExternal = iota
	TypeInternal
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlarmTag

type AlarmTag struct {
	ID            string           `bson:"_id" json:"_id"`
	Type          int64            `bson:"type" json:"type"`
	Value         string           `bson:"value" json:"value"`
	Label         string           `bson:"label" json:"label"`
	Color         string           `bson:"color" json:"color"`
	Author        string           `bson:"author" json:"author"`
	Created       datetime.CpsTime `bson:"created" json:"created"`
	Updated       datetime.CpsTime `bson:"updated" json:"updated"`
	LastEventDate datetime.CpsTime `bson:"last_event_date,omitempty" json:"last_event_date,omitempty"`

	savedpattern.EntityPatternFields `bson:",inline"`
	savedpattern.AlarmPatternFields  `bson:",inline"`
}

type ExternalUpdater

type ExternalUpdater interface {
	Add(tags map[string]string)
	Update(ctx context.Context) error
}

func NewExternalUpdater

func NewExternalUpdater(client mongo.DbClient) ExternalUpdater

type InternalTagAlarmMatcher

type InternalTagAlarmMatcher interface {
	Load(ctx context.Context) error
	Match(entity types.Entity, alarm types.Alarm) []string
}

func NewInternalTagAlarmMatcher

func NewInternalTagAlarmMatcher(client mongo.DbClient) InternalTagAlarmMatcher

Jump to

Keyboard shortcuts

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