Documentation
¶
Overview ¶
Package dependency contains an utility for sorting a set of Kubernetes resource objects that implement the Dependent interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sort ¶
func Sort(objects []Dependent) ([]meta.NamespacedObjectReference, error)
Sort takes a slice of Dependent objects and returns a sorted slice of NamespacedObjectReference based on their dependencies. It performs a topological sort using a depth-first search algorithm, which has runtime complexity of O(|V| + |E|), where |V| is the number of vertices (objects) and |E| is the number of edges (dependencies).
Reference: https://en.wikipedia.org/wiki/Topological_sorting#Depth-first_search
Types ¶
Click to show internal directories.
Click to hide internal directories.