dependency

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 4 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

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

type Dependent

type Dependent interface {
	GetName() string
	GetNamespace() string
	meta.ObjectWithDependencies
}

Dependent interface defines methods that a Kubernetes resource object should implement in order to use the dependency package for ordering dependencies.

Jump to

Keyboard shortcuts

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