runtime

package
v0.84.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context carries all runtime state available during expression evaluation.

A single Context is created per Program.Run call and passed down through every Eval call.

func NewContext

func NewContext(target core.Target, registry *stdlib.Registry) *Context

func (*Context) CallFunc

func (c *Context) CallFunc(pos core.Position, name string, positional []core.Value, named map[string]core.Value) (core.Value, error)

func (*Context) DeleteVar

func (c *Context) DeleteVar(name string)

func (*Context) GetTarget

func (c *Context) GetTarget() core.Target

func (*Context) GetVar

func (c *Context) GetVar(name string) (core.Value, bool)

func (*Context) SetVar

func (c *Context) SetVar(name string, value core.Value)

type MapTarget

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

MapTarget is the standard in-memory Target.

func NewMapTarget

func NewMapTarget() *MapTarget

func NewMapTargetFrom

func NewMapTargetFrom(event map[string]core.Value) *MapTarget

func (*MapTarget) Delete

func (t *MapTarget) Delete(path core.Path) error

func (*MapTarget) Event

func (t *MapTarget) Event() map[string]core.Value

func (*MapTarget) Get

func (t *MapTarget) Get(path core.Path) (core.Value, error)

func (*MapTarget) Metadata

func (t *MapTarget) Metadata() map[string]core.Value

func (*MapTarget) Set

func (t *MapTarget) Set(path core.Path, value core.Value) error

type RootTarget

type RootTarget struct {
	Root       *insaneJSON.Root
	SourceName string
	// contains filtered or unexported fields
}

func NewRootTarget

func NewRootTarget(root *insaneJSON.Root, sourceName string, metadata map[string]string) *RootTarget

func (*RootTarget) Delete

func (t *RootTarget) Delete(path core.Path) error

func (*RootTarget) Get

func (t *RootTarget) Get(path core.Path) (core.Value, error)

func (*RootTarget) Set

func (t *RootTarget) Set(path core.Path, value core.Value) error

Jump to

Keyboard shortcuts

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