expand

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentAnalyzer

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

ComponentAnalyzer provides analysis of components and their resolved properties

func NewComponentAnalyzer

func NewComponentAnalyzer(normalized *model.NormalizedIntent) *ComponentAnalyzer

NewComponentAnalyzer creates a new component analyzer

func (*ComponentAnalyzer) AnalyzeAll

func (ca *ComponentAnalyzer) AnalyzeAll() (map[string][]*model.ComponentInstance, error)

AnalyzeAll expands all components and returns merged instances

func (*ComponentAnalyzer) GetComponentByName

func (ca *ComponentAnalyzer) GetComponentByName(compName string) (*ComponentMerged, error)

GetComponentByName returns merged component info for a single component

func (*ComponentAnalyzer) ListAll

func (ca *ComponentAnalyzer) ListAll() ([]*ComponentMerged, error)

ListAll lists all components with their merged properties

type ComponentMerged

type ComponentMerged struct {
	Name         string
	Type         string
	Domain       string
	Enabled      bool
	SourcePath   string
	Instances    []*model.ComponentInstance
	Dependencies []string
}

GetComponent returns merged component data for a specific component across all environments

type DependencyResolver

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

DependencyResolver provides utilities for resolving component dependencies

func NewDependencyResolver

func NewDependencyResolver(normalized *model.NormalizedIntent) *DependencyResolver

NewDependencyResolver creates a new dependency resolver

func (*DependencyResolver) CategorizeDependencies

func (dr *DependencyResolver) CategorizeDependencies(changedComponents map[string]bool) (
	changed map[string]bool,
	dependencies map[string]bool,
	dependents map[string]bool,
)

CategorizeDependencies takes changed components and returns three sets: - Changed: the original changed components - Dependencies: components needed by changed ones - Dependents: components that depend on changed ones Useful for component --changed scenarios

func (*DependencyResolver) GetDependencies

func (dr *DependencyResolver) GetDependencies(componentName string) []string

GetDependencies returns all direct dependencies of a component

func (*DependencyResolver) GetDependents

func (dr *DependencyResolver) GetDependents(componentName string) []string

GetDependents returns all components that depend on the given component

func (*DependencyResolver) GetTransitiveDependencies

func (dr *DependencyResolver) GetTransitiveDependencies(componentName string) map[string]bool

GetTransitiveDependencies returns all transitive dependencies of a component

func (*DependencyResolver) GetTransitiveDependents

func (dr *DependencyResolver) GetTransitiveDependents(componentName string) map[string]bool

GetTransitiveDependents returns all components that transitively depend on the given component

func (*DependencyResolver) ResolveComponentSet

func (dr *DependencyResolver) ResolveComponentSet(changedComponents map[string]bool) map[string]bool

ResolveComponentSet takes a set of changed components and returns: - All changed components - All their dependencies (so planner can resolve) Useful for plan --changed scenarios

type Expander

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

Expander handles environment × component expansion and merging

func NewExpander

func NewExpander(normalized *model.NormalizedIntent) *Expander

NewExpander creates a new expander

func (*Expander) Expand

func (e *Expander) Expand() (map[string][]*model.ComponentInstance, error)

Expand produces ComponentInstances for each environment × component pair

func (*Expander) GetComponentInstance

func (e *Expander) GetComponentInstance(envName, compName string, instances map[string][]*model.ComponentInstance) *model.ComponentInstance

GetComponentInstance retrieves a specific component instance

func (*Expander) WithRegistry added in v1.21.0

func (e *Expander) WithRegistry(registry *compositionpkg.Registry) *Expander

WithRegistry sets the composition registry for profile resolution.

Jump to

Keyboard shortcuts

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