models

package
v0.0.0-...-0df215e Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertError

type AlertError struct {
	FirstTime, LastTime time.Time
	Count               int
	Message             string
}

type AlertKey

type AlertKey string

func NewAlertKey

func NewAlertKey(name string, group opentsdb.TagSet) AlertKey

func ParseAlertKey

func ParseAlertKey(a string) (ak AlertKey, err error)

func (AlertKey) Group

func (a AlertKey) Group() opentsdb.TagSet

Group returns the tagset of this alert key. Will panic if a is not a valid AlertKey. OpenTSDB tag validation errors are ignored.

func (AlertKey) Name

func (a AlertKey) Name() string

type AlertKeys

type AlertKeys []AlertKey

func (AlertKeys) Len

func (a AlertKeys) Len() int

func (AlertKeys) Less

func (a AlertKeys) Less(i, j int) bool

func (AlertKeys) Swap

func (a AlertKeys) Swap(i, j int)

type Incident

type Incident struct {
	Id       uint64
	Start    time.Time
	End      *time.Time
	AlertKey AlertKey
}

type Silence

type Silence struct {
	Start, End time.Time
	Alert      string
	Tags       opentsdb.TagSet
	TagString  string
	Forget     bool
	User       string
	Message    string
}

func (*Silence) ActiveAt

func (s *Silence) ActiveAt(now time.Time) bool

func (Silence) ID

func (s Silence) ID() string

func (*Silence) Matches

func (s *Silence) Matches(alert string, tags opentsdb.TagSet) bool

func (*Silence) Silenced

func (s *Silence) Silenced(now time.Time, alert string, tags opentsdb.TagSet) bool

Jump to

Keyboard shortcuts

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