adapters

package
v1.221.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTerraformGraph

func BuildTerraformGraph(stacks map[string]any) (*dependency.Graph, error)

BuildTerraformGraph builds a Terraform component graph from described stacks.

func ExecuteTerraform

func ExecuteTerraform(ctx context.Context, opts TerraformOptions) error

ExecuteTerraform runs selected Terraform components through the shared scheduler.

func FilterTerraformGraph

func FilterTerraformGraph(atmosConfig *schema.AtmosConfiguration, graph *dependency.Graph, info *schema.ConfigAndStacksInfo, selection *TerraformSelection) (*dependency.Graph, error)

FilterTerraformGraph narrows graph nodes to the user-selected bulk operation set.

Types

type TerraformDispatcher

type TerraformDispatcher struct {
	// contains filtered or unexported fields
}

TerraformDispatcher adapts scheduler nodes to Terraform component execution.

func (*TerraformDispatcher) Dispatch

Dispatch executes one Terraform scheduler node.

type TerraformExecution

type TerraformExecution struct {
	Context       context.Context
	Info          schema.ConfigAndStacksInfo
	Stdout        io.Writer
	Stderr        io.Writer
	CaptureOutput bool
	Flush         func() error
}

TerraformExecution contains the execution context for one Terraform component.

type TerraformExecutionResult

type TerraformExecutionResult struct {
	Stdout  string
	Stderr  string
	Changed bool
}

TerraformExecutionResult contains captured output for one Terraform component.

func (TerraformExecutionResult) CombinedOutput

func (r TerraformExecutionResult) CombinedOutput() string

CombinedOutput returns stdout and stderr in the order hooks expect.

type TerraformExecutor

type TerraformExecutor func(TerraformExecution) (TerraformExecutionResult, error)

TerraformExecutor executes one resolved Terraform component instance.

type TerraformNodeOutcome

type TerraformNodeOutcome struct {
	Processed bool              `json:"processed"`
	Changed   bool              `json:"changed"`
	ExitCode  int               `json:"exit_code"`
	LogFiles  map[string]string `json:"log_files,omitempty"`
}

TerraformNodeOutcome records the scheduler-visible result for one Terraform node.

type TerraformOptions

type TerraformOptions struct {
	AtmosConfig *schema.AtmosConfiguration
	Info        *schema.ConfigAndStacksInfo
	Stacks      map[string]any
	Executor    TerraformExecutor
	Selection   *TerraformSelection
}

TerraformOptions configures graph-backed Terraform bulk execution.

type TerraformSelection

type TerraformSelection struct {
	NodeIDs             []string
	IncludeDependencies bool
	IncludeDependents   bool
}

TerraformSelection narrows the scheduler graph to a precomputed set of Terraform nodes, optionally including graph closure around those nodes.

Jump to

Keyboard shortcuts

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