methods

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertErrorOptions added in v0.1.11

type AlertErrorOptions struct {
	ServiceName        string
	AvailabilityTarget float64

	// important for simple algorithm
	AlertWindow string
	AlertWait   string
}

type AlertLatencyOptions added in v0.1.11

type AlertLatencyOptions struct {
	ServiceName string
	Targets     []LatencyTarget

	// important for simple algorithm
	AlertWindow string
	AlertWait   string
}

type AlertMethod

type AlertMethod interface {
	AlertForError(*AlertErrorOptions) ([]rulefmt.Rule, error)
	AlertForLatency(*AlertLatencyOptions) ([]rulefmt.Rule, error)
}

func Get

func Get(name string) AlertMethod

type LatencyTarget

type LatencyTarget struct {
	LE     string  `yaml:"le"`
	Target float64 `yaml:"target"`
}

type MultiRateErrorOpts

type MultiRateErrorOpts struct {
	Metric string
	Labels labels.Labels
	Value  float64
	Kind   string // page or ticket
}

type MultiRateLatencyOpts

type MultiRateLatencyOpts struct {
	Metric  string
	Label   labels.Label
	Buckets []LatencyTarget
	Kind    string // page or ticket
}

type MultiRateWindow

type MultiRateWindow [2]struct {
	Multiplier  float64
	LongWindow  string
	ShortWindow string
}

type MultiWindowAlgorithm

type MultiWindowAlgorithm struct{}

func (*MultiWindowAlgorithm) AlertForError

func (*MultiWindowAlgorithm) AlertForError(opts *AlertErrorOptions) ([]rulefmt.Rule, error)

func (*MultiWindowAlgorithm) AlertForLatency

func (*MultiWindowAlgorithm) AlertForLatency(opts *AlertLatencyOptions) ([]rulefmt.Rule, error)

type SimpleAlgorithm added in v0.1.11

type SimpleAlgorithm struct{}

func (*SimpleAlgorithm) AlertForError added in v0.1.11

func (*SimpleAlgorithm) AlertForError(opts *AlertErrorOptions) ([]rulefmt.Rule, error)

func (*SimpleAlgorithm) AlertForLatency added in v0.1.11

func (*SimpleAlgorithm) AlertForLatency(opts *AlertLatencyOptions) ([]rulefmt.Rule, error)

Jump to

Keyboard shortcuts

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