resolution

package
v1.226.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Clear clears the resolution context for the current goroutine.

func Scoped

func Scoped() func()

Scoped creates a new scoped resolution context and returns a restore function. This prevents memory leaks and cross-call contamination by ensuring contexts are cleaned up. Usage:

restoreCtx := resolution.Scoped()
defer restoreCtx()

Types

type Context

type Context struct {
	CallStack []DependencyNode
	Visited   map[string]bool // Map of "stack-component" to track visited nodes.
}

Context tracks the call stack during YAML function resolution to detect circular dependencies.

func GetOrCreate

func GetOrCreate() *Context

GetOrCreate gets or creates a resolution context for the current goroutine.

func NewContext

func NewContext() *Context

NewContext creates a new resolution context for cycle detection.

func (*Context) Clone

func (ctx *Context) Clone() *Context

Clone creates a copy of the resolution context for use in concurrent operations.

func (*Context) Pop

func (ctx *Context) Pop(atmosConfig *schema.AtmosConfiguration)

Pop removes the top node from the call stack.

func (*Context) Push

func (ctx *Context) Push(atmosConfig *schema.AtmosConfiguration, node DependencyNode) error

Push adds a node to the call stack and checks for circular dependencies.

type DependencyNode

type DependencyNode struct {
	Component    string
	Stack        string
	FunctionType string // "terraform.state", "terraform.output", "atmos.Component".
	FunctionCall string // Full function call for error reporting.
}

DependencyNode represents a single node in the dependency resolution chain.

Jump to

Keyboard shortcuts

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