alert

package
v2.367.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 23 modules, 71 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Alert() (Alert, error)
	IsIgnorable() bool
}

type Alert

type Alert struct {
	ID        string        `json:"id"`
	Severity  SeverityLevel `json:"severity"`
	Title     string        `json:"title"`
	Summary   string        `json:"summary"`
	CreatedAt int64         `json:"created_at"`
}

type MonitAdapter

type MonitAdapter interface {
	IsIgnorable() bool
	Alert() (Alert, error)
	Severity() (severity SeverityLevel, found bool)
}

func NewMonitAdapter

func NewMonitAdapter(monitAlert MonitAlert, settingsService boshsettings.Service, timeService clock.Clock) MonitAdapter

type MonitAlert

type MonitAlert struct {
	ID          string
	Service     string
	Event       string
	Action      string
	Date        string // RFC1123Z formatted date string
	Description string
}

type SeverityLevel

type SeverityLevel int
const (
	SeverityAlert    SeverityLevel = 1
	SeverityCritical SeverityLevel = 2
	SeverityError    SeverityLevel = 3
	SeverityWarning  SeverityLevel = 4
	SeverityIgnored  SeverityLevel = -1
	SeverityDefault  SeverityLevel = SeverityCritical
)

Jump to

Keyboard shortcuts

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