evaluator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 15 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 struct {
	// contains filtered or unexported fields
}

Evaluator executes compiled WASM modules with provided runtime data

func New

func New(
	handler slog.Handler,
	execUnit *script.ExecutableUnit,
) *Evaluator

New creates a new Evaluator object

func (*Evaluator) AddDataToContext

func (be *Evaluator) AddDataToContext(
	ctx context.Context,
	d ...map[string]any,
) (context.Context, error)

AddDataToContext implements the data.Setter interface which stores and prepares runtime data which can be eventually passed to the Eval method.

func (*Evaluator) Eval

Eval implements evaluation.Evaluator TODO: Some error paths in this method are hard to test with the current design Consider adding more integration tests to cover these paths.

func (*Evaluator) String

func (be *Evaluator) String() string

Jump to

Keyboard shortcuts

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