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
Reading []string
External bool
// contains filtered or unexported fields
}
Component represents a discovered Terragrunt configuration.
func (*Component) AddDependency ¶ added in v0.91.3
AddDependency adds a dependency to the Component and vice versa.
Using this method ensure that the dependency graph is properly maintained, making it easier to look up dependents and dependencies on a given component without the entire graph available.
func (*Component) AddDependent ¶ added in v0.91.3
AddDependent adds a dependent to the Component and vice versa.
Using this method ensure that the dependency graph is properly maintained, making it easier to look up dependents and dependencies on a given component without the entire graph available.
func (*Component) Dependencies ¶
func (c *Component) Dependencies() Components
Dependencies returns the dependencies of the Component.
func (*Component) Dependents ¶ added in v0.91.3
func (c *Component) Dependents() Components
Dependents returns the dependents of the Component.
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.