alerting

package
Version: v0.0.0-...-8223eb1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertInfo

type AlertInfo struct {
	Description string
	// Used to dedup alerts so multiple alerts don't occur from the same problem
	IncidentKey string
	// Arbitrary JSON for alert triage
	Details interface{}
}

Currently the Alerter interface only has a single implementation for PagerDuty. As a result, AlertInfo has information that PagerDuty needs, and other integrations may not. As a result, some information here may be ignored in future implementations.

type Alerter

type Alerter interface {
	Alert(alertInfo AlertInfo, urgency Urgency) error
}

func NewNop

func NewNop() Alerter

func NewPagerduty

func NewPagerduty(highUrgencyServiceKey string, lowUrgencyServiceKey string, client *http.Client) (Alerter, error)

type Poster

type Poster interface {
	Post(uri string, contentType string, body io.Reader) (resp *http.Response, err error)
}

Subset of *http.Client functionality, useful for testing

type Urgency

type Urgency string
const (
	HighUrgency Urgency = "high_urgency"
	LowUrgency  Urgency = "low_urgency"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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