metathings_plugin_evaluator

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedOperatorName  = errors.New("unsupported operator name")
	ErrUnexpectedOperatorResult = errors.New("unexpected operator result")
)

Functions

func IsValidOperatorName

func IsValidOperatorName(driver string) bool

Types

type Evaluator

type Evaluator interface {
	Id() string
	Eval(context.Context, esdk.Data) error
}

func NewEvaluator

func NewEvaluator(args ...interface{}) (Evaluator, error)

type EvaluatorImpl

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

func NewEvaluatorImpl

func NewEvaluatorImpl(args ...interface{}) (*EvaluatorImpl, error)

func (*EvaluatorImpl) Eval

func (e *EvaluatorImpl) Eval(ctx context.Context, dat esdk.Data) error

func (*EvaluatorImpl) Id

func (e *EvaluatorImpl) Id() string

type EvaluatorImplOption

type EvaluatorImplOption struct {
	Operator map[string]interface{}
}

type LuaOperator

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

func (*LuaOperator) Close

func (lo *LuaOperator) Close() error

func (*LuaOperator) Run

func (lo *LuaOperator) Run(ctx, dat esdk.Data) (esdk.Data, error)

type LuaOperatorOption

type LuaOperatorOption struct {
	Code string
}

type Operator

type Operator interface {
	Run(ctx, dat esdk.Data) (esdk.Data, error)
	Close() error
}

func NewLuaOperator

func NewLuaOperator(args ...interface{}) (Operator, error)

func NewOperator

func NewOperator(driver string, args ...interface{}) (Operator, error)

type OperatorFactory

type OperatorFactory func(args ...interface{}) (Operator, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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