mapper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyGraph

type DependencyGraph struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DependencyGraph is a data structure to track bi-directional dependencies between two Reference

func (*DependencyGraph) AddDependency

func (g *DependencyGraph) AddDependency(obj1, obj2 Reference)

AddDependency adds a dependency between two Reference

func (*DependencyGraph) GetAllDependenciesFor

func (g *DependencyGraph) GetAllDependenciesFor(obj1 Reference) []Reference

GetAllDependenciesFor gets all dependencies of a Reference

func (*DependencyGraph) HasDependency

func (g *DependencyGraph) HasDependency(obj1, obj2 Reference) bool

HasDependency checks if a dependency exists between two Reference

func (*DependencyGraph) RemoveAllDependenciesFor

func (g *DependencyGraph) RemoveAllDependenciesFor(obj1 Reference)

RemoveAllDependenciesFor removes all dependencies of a Reference

func (*DependencyGraph) RemoveDependency

func (g *DependencyGraph) RemoveDependency(obj1, obj2 Reference)

RemoveDependency removes a dependency between two Reference

type Mapper

type Mapper struct {
	Graph DependencyGraph
}

Mapper maps namespaces to their ArgoCD instance

func (*Mapper) Map

func (m *Mapper) Map(obj handler.MapObject) []reconcile.Request

Map implements the handler.Mapper interface

type Object

type Object interface {
	metav1.Object
	runtime.Object
}

Object unifies the metav1.Object and runtime.Object interface

type Reference

type Reference struct {
	APIGroup  string
	Kind      string
	Namespace string
	Name      string
}

Reference refers to a kubernetes resource

func ReferenceFromMapObject

func ReferenceFromMapObject(obj handler.MapObject) Reference

ReferenceFromMapObject creates a Reference from a handler.MapObject

func ReferenceFromObject

func ReferenceFromObject(obj Object) Reference

ReferenceFromObject creates a Reference from an Object

Jump to

Keyboard shortcuts

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