dependency

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 10 modules, 8 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

This section is empty.

Types

type CircularDependencyError

type CircularDependencyError [][]string

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

func (CircularDependencyError) Error

func (e CircularDependencyError) Error() string

type CrossNamespaceDependencyReference

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

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

func (CrossNamespaceDependencyReference) String

type Dependent

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.

Jump to

Keyboard shortcuts

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