routes

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRoutes = "*/warning/*;*/critical/*;*/resolved/*"

Functions

This section is empty.

Types

type Route

type Route struct {
	Check      string
	CheckLevel checks.CheckStatus
	Notifier   string
}

Routes holds the routing information for every checks, alert level combination which Notifier should be used. Routes are of the form

`check-name/check-result/notifier-name`

Ex. min-healthy/warning/slack The default Route(s) are of the form

`*/warning/*` and `*/critical/*` and `*/resolved/*`

func ParseRoutes

func ParseRoutes(routes string) ([]Route, error)

func (*Route) Match

func (r *Route) Match(check checks.AppCheck) bool

func (*Route) MatchCheckResult added in v0.3.1

func (r *Route) MatchCheckResult(level checks.CheckStatus) bool

func (*Route) MatchNotifier

func (r *Route) MatchNotifier(notifier string) bool

Jump to

Keyboard shortcuts

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