expression

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 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 ErrInvalidExpression

type ErrInvalidExpression struct {
	// contains filtered or unexported fields
}

ErrInvalidExpression represents bad expression or its state error

func (ErrInvalidExpression) Error

func (err ErrInvalidExpression) Error() string

type TriggerExpression

type TriggerExpression struct {
	Expression *string

	WarnValue   *float64
	ErrorValue  *float64
	TriggerType string

	MainTargetValue         float64
	AdditionalTargetsValues map[string]float64
	PreviousState           moira.State
}

TriggerExpression represents trigger expression handler parameters, what can be used for trigger expression handling

func (*TriggerExpression) Evaluate

func (triggerExpression *TriggerExpression) Evaluate() (moira.State, error)

Evaluate gets trigger expression and evaluates it for given parameters using govaluate

func (TriggerExpression) Get

func (triggerExpression TriggerExpression) Get(name string) (interface{}, error)

Get realizing govaluate.Parameters interface used in evaluable expression

Jump to

Keyboard shortcuts

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