contracts

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCompiler added in v0.6.0

func WithCompiler(ctx context.Context, c PipelineCompiler) context.Context

WithCompiler attaches a PipelineCompiler to ctx.

func WithRegistry added in v0.6.0

func WithRegistry(ctx context.Context, reg Registry) context.Context

WithRegistry attaches a Registry to ctx. Called by the flow compiler before every action execution, so context-aware nodes find it automatically.

Types

type PipelineCompiler

type PipelineCompiler interface {
	CompilePipeline(expr string) (action.Executable, error)
}

PipelineCompiler compiles a DSL string into an executable action. Used by supervisor, which spawns and runs child pipelines on the fly.

func CompilerFromContext added in v0.6.0

func CompilerFromContext(ctx context.Context) PipelineCompiler

CompilerFromContext returns the PipelineCompiler attached by WithCompiler, or nil.

type Registry

type Registry interface {
	Get(name string) (action.AnyAction, bool)
	Actions() []action.AnyAction
}

Registry is the read-only view of the action set that the compiler exposes to nodes that need to look up other actions by name (bench.run, distribute.map).

func RegistryFromContext added in v0.6.0

func RegistryFromContext(ctx context.Context) Registry

RegistryFromContext returns the Registry attached by WithRegistry, or nil when the action is running outside a flow.

Jump to

Keyboard shortcuts

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