Documentation ¶
Overview ¶
Package dependency implements controller dependency database.
Index ¶
- type Database
- func (db *Database) AddControllerInput(controllerName string, dep controller.Input) error
- func (db *Database) AddControllerOutput(controllerName string, out controller.Output) error
- func (db *Database) DeleteControllerInput(controllerName string, dep controller.Input) error
- func (db *Database) Export() (*controller.DependencyGraph, error)
- func (db *Database) GetControllerInputs(controllerName string) ([]controller.Input, error)
- func (db *Database) GetControllerOutputs(controllerName string) ([]controller.Output, error)
- func (db *Database) GetDependentControllers(dep controller.Input) ([]string, error)
- func (db *Database) GetResourceExclusiveController(resourceType resource.Type) (string, error)
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 (*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 ¶
GetResourceExclusiveController returns controller which has a resource as exclusive output.
If no controller manages a resource in exclusive mode, empty string is returned.