pkg: github.com/fluxcd/pkg/runtime/dependency Index | Files

package dependency

import "github.com/fluxcd/pkg/runtime/dependency"

Index

Package Files

sort.go

type CircularDependencyError Uses

type CircularDependencyError [][]string

CircularDependencyError contains the circular dependency chains that were detected while sorting the Dependent dependencies.

func (CircularDependencyError) Error Uses

func (e CircularDependencyError) Error() string

type CrossNamespaceDependencyReference Uses

type CrossNamespaceDependencyReference struct {
    // Namespace holds the namespace reference of a dependency.
    // +optional
    Namespace string `json:"namespace,omitempty"`

    // Name holds the name reference of a dependency.
    // +required
    Name string `json:"name"`
}

CrossNamespaceDependencyReference holds the reference to a dependency.

func Sort Uses

func Sort(d []Dependent) ([]CrossNamespaceDependencyReference, error)

Sort sorts the Dependent slice based on their listed dependencies using Tarjan's strongly connected components algorithm.

func (CrossNamespaceDependencyReference) String Uses

func (r CrossNamespaceDependencyReference) String() string

type Dependent Uses

type Dependent interface {
    // GetDependsOn returns the Dependent's types.NamespacedName,
    // and the CrossNamespaceDependencyReference slice it depends on.
    GetDependsOn() (types.NamespacedName, []CrossNamespaceDependencyReference)
}

Dependent provides an interface for resources that maintain CrossNamespaceDependencyReference list.

Package dependency imports 3 packages (graph). Updated 2020-10-28. Refresh now. Tools for package owners.