runtime

package
v0.87.7-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: BSD-3-Clause Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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