evaluator

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

type Evaluator interface {
	EvalWithMetric(metricName string, targetValue float64, value float64) bool
	EvalWithRawQuery(input string, rule string) bool
}

func NewExpressionEvaluator

func NewExpressionEvaluator() Evaluator

func NewOpaEvaluator

func NewOpaEvaluator() Evaluator

type ExpressionEvaluator

type ExpressionEvaluator struct {
}

func (*ExpressionEvaluator) EvalWithMetric

func (c *ExpressionEvaluator) EvalWithMetric(metricName string, targetValue float64, value float64) bool

func (*ExpressionEvaluator) EvalWithRawQuery

func (c *ExpressionEvaluator) EvalWithRawQuery(input string, rule string) bool

type OpaEvaluator

type OpaEvaluator struct {
}

func (*OpaEvaluator) EvalWithMetric

func (c *OpaEvaluator) EvalWithMetric(metricName string, targetValue float64, value float64) bool

func (*OpaEvaluator) EvalWithRawQuery

func (c *OpaEvaluator) EvalWithRawQuery(input string, rule string) bool

Jump to

Keyboard shortcuts

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