Documentation
¶
Overview ¶
Package component provides types for representing discovered Terragrunt components.
These include units and stacks.
This package contains only data types and their associated methods, with no discovery logic. It exists separately from the discovery package to allow other packages (like filter) to depend on these types without creating circular dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
Parsed *config.TerragruntConfig
DiscoveryContext *DiscoveryContext
Kind Kind
Path string
Dependencies Components
External bool
}
Component represents a discovered Terragrunt configuration.
type Components ¶
type Components []*Component
Components is a list of discovered Terragrunt components.
func (Components) CycleCheck ¶
func (c Components) CycleCheck() (*Component, error)
CycleCheck checks for cycles in the dependency graph. If a cycle is detected, it returns the first Component that is part of the cycle, and an error. If no cycle is detected, it returns nil and nil.
func (Components) Filter ¶
func (c Components) Filter(kind Kind) Components
Filter filters the Components by config type.
func (Components) FilterByPath ¶
func (c Components) FilterByPath(path string) Components
FilterByPath filters the Components by path.
func (Components) Paths ¶
func (c Components) Paths() []string
Paths returns the paths of the Components.
func (Components) RemoveByPath ¶
func (c Components) RemoveByPath(path string) Components
RemoveByPath removes the Component with the given path from the Components.
type DiscoveryContext ¶
DiscoveryContext is the context in which a Component was discovered.
It's useful to know this information, because it can help us determine how the Component should be run or enqueued later.