events

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	CheckID   string             `json:"-"`
	CheckName string             `json:"-"`
	CheckType string             `json:"-"`
	Time      utils.RFCTime      `json:"time"`
	Data      data.CheckResponse `json:"data"`
	Tags      map[string]string  `json:"tags"`
	Messages  []string           `json:"messages"`
}

func NewEvent

func NewEvent(checkID, checkName, checkType string, checkResponse data.CheckResponse) *Event

func (*Event) AddTag

func (e *Event) AddTag(t string)

func (*Event) DisplayMetric

func (e *Event) DisplayMetric(metric string) string

func (*Event) DisplayTags

func (e *Event) DisplayTags() string

func (*Event) HasTag

func (e *Event) HasTag(t string) bool

func (*Event) IsGreenAlert

func (e *Event) IsGreenAlert() bool

func (*Event) IsRedAlert

func (e *Event) IsRedAlert() bool

func (*Event) MarkGreenAlert

func (e *Event) MarkGreenAlert()

func (*Event) MarkRedAlert

func (e *Event) MarkRedAlert(messages []string)

Jump to

Keyboard shortcuts

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