vm

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	// Key is the document identity (filesystem-style relative path).
	Key string

	// Value is the polymorphic content (Text, Json, List, Binary).
	Value Gist

	// Steps holds named outputs from prior steps (shared across cells).
	// Downstream stages reference these via Go templates (e.g., {{.steps.extract}}).
	Steps map[string]Gist

	// Env holds environment/metadata key-value pairs.
	Env map[string]any
}

Cell is the unit of data flowing through the pipeline. It is a reference to a mutable memory location within the workflow's address space. Channels pass *Cell pointers — lightweight, zero-copy.

func NewCell

func NewCell(key string, value Gist) *Cell

NewCell creates a Cell with initialized maps.

func (*Cell) Copy

func (c *Cell) Copy(value Gist) *Cell

Copy creates a shallow copy of the Cell with a new Value. Steps and Env maps are shared (not deep-copied) — this is intentional for shared memory semantics within a pipeline.

type Gist

type Gist interface {
	ContentType() string
}

Gist is the polymorphic content interface. Implementations exist in runtime package (Text, Json, List, Binary). The vm package defines the interface; concrete types are in the domain layer.

Jump to

Keyboard shortcuts

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