dependency

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MPL-2.0 Imports: 6 Imported by: 0 modules, 0 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 implements controller dependency database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database tracks dependencies between resources and controllers (and vice versa).

func NewDatabase

func NewDatabase() (*Database, error)

NewDatabase creates new Database.

func (*Database) AddControllerInput

func (db *Database) AddControllerInput(controllerName string, dep controller.Input) error

AddControllerInput adds a dependency of controller on a resource.

func (*Database) AddControllerOutput

func (db *Database) AddControllerOutput(controllerName string, out controller.Output) error

AddControllerOutput tracks which resource is managed by which controller.

func (*Database) DeleteControllerInput

func (db *Database) DeleteControllerInput(controllerName string, dep controller.Input) error

DeleteControllerInput adds a dependency of controller on a resource.

func (*Database) Export

func (db *Database) Export() (*controller.DependencyGraph, error)

Export dependency graph.

func (*Database) GetControllerInputs

func (db *Database) GetControllerInputs(controllerName string) ([]controller.Input, error)

GetControllerInputs returns a list of controller dependencies.

func (*Database) GetControllerOutputs

func (db *Database) GetControllerOutputs(controllerName string) ([]controller.Output, error)

GetControllerOutputs returns resource managed by controller.

This method is not optimized for performance and should be used only for debugging.

func (*Database) GetDependentControllers

func (db *Database) GetDependentControllers(dep controller.Input) ([]string, error)

GetDependentControllers returns a list of controllers which depend on resource change.

func (*Database) GetResourceExclusiveController

func (db *Database) GetResourceExclusiveController(resourceType resource.Type) (string, error)

GetResourceExclusiveController returns controller which has a resource as exclusive output.

If no controller manages a resource in exclusive mode, empty string is returned.

Jump to

Keyboard shortcuts

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