Help us shape the future of Go! Take the 2026 Go Developer Survey

execbatch

package
v1.234.0-nightly.40610... Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package execbatch evaluates ordinary !exec values with bounded concurrency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(ctx context.Context, input map[string]any, limit int, execute Executor) (map[string]any, error)

Evaluate copies a document and evaluates its !exec leaves. Only command execution is concurrent; discovery and result placement are serial and the caller's maps and slices remain untouched. This explicit evaluation API accepts string expressions as well as preserved YAML tags.

func Resolve

func Resolve(config *schema.AtmosConfiguration, data map[string]any, skip []string, explicitTags bool) (map[string]any, error)

Resolve leaves serial evaluation unchanged and delegates only opted-in !exec work. The caller supplies the edition's explicit-tag policy for automatic evaluation.

Types

type Executor

type Executor func(context.Context, string, string) (any, error)

Executor runs one command at its document path. Implementations must support concurrent calls.

func ShellExecutor

func ShellExecutor() (Executor, error)

ShellExecutor captures the caller's working directory and environment once for a batch. Stderr remains masked and each line is attributed to the expression's document path.

type Value

type Value struct{ Data any }

Value marks an already evaluated expression so its output is not interpreted as another tag.

Jump to

Keyboard shortcuts

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