runtime

package
v0.0.0-...-99a2e32 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedType = errors.New("unsupported type")

ErrUnsupportedType is returned when the type is not supported.

Functions

func GoNativeValue

func GoNativeValue(v ref.Val) (interface{}, error)

GoNativeValue transforms CEL output into corresponding Go native type values.

Types

type ProgressEvent

type ProgressEvent struct {
	Transformation *graph.Transformation
	State          State
	Err            error
}

ProgressEvent represents a state change during graph execution.

type Runtime

type Runtime struct {
	Environment              *cel.Env
	EvaluatedExpressionCache map[string]any
	EvaluatedTransformations map[string]any

	Transformers map[runtime.Type]Transformer
	Events       chan<- ProgressEvent
}

func (*Runtime) ProcessValue

func (b *Runtime) ProcessValue(ctx context.Context, transformation graph.Transformation) error

type State

type State int

State represents the state of a transformation node.

const (
	// Running means the transformation is currently being processed.
	Running State = iota
	// Completed means the transformation completed successfully.
	Completed
	// Failed means the transformation failed.
	Failed
)

func (State) String

func (s State) String() string

type Transformer

type Transformer interface {
	Transform(
		ctx context.Context,
		step runtime.Typed,
	) (runtime.Typed, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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