evaluator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 13 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 is an abstraction layer for evaluating code on the Starlark VM

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 evaluates the loaded bytecode and passes the provided data into the Starlark VM

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