graph

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValuesKeyGlobal = "global"
)

Variables

This section is empty.

Functions

func SubChartValues

func SubChartValues(subChartName string, values map[string]interface{}) (*apiextensionsv1.JSON, error)

SubChartValues is the equivalent function to what helm client does with the global values file and its subchart values

Types

type AppNode

type AppNode struct {
	Name         string
	Dependencies []string
	Tasks        map[string]*TaskNode
}

func NewAppNode

func NewAppNode(application *v1alpha1.Application) *AppNode

func (*AppNode) DeepCopy

func (appNode *AppNode) DeepCopy() *AppNode

type ExecutorNode

type ExecutorNode struct {
	Name         string
	Dependencies []string
	Executor     executorpkg.Executor
	Params       *apiextensionsv1.JSON
}

func NewDefaultExecutorNode

func NewDefaultExecutorNode() *ExecutorNode

func NewExecutorNode

func NewExecutorNode(executor *v1alpha1.Executor) *ExecutorNode

func (*ExecutorNode) DeepCopy

func (executorNode *ExecutorNode) DeepCopy() *ExecutorNode

type Graph

type Graph struct {
	Name         string
	AllExecutors map[string]executorpkg.Executor
	Nodes        map[string]*AppNode
}

func Combine

func Combine(a, b *Graph) *Graph

Combine adds app nodes from the second graph to the first graph If an app node with the same name exists in second graph from the first graph, it is ignored.

func Diff

func Diff(a, b *Graph) *Graph

Diff returns the difference between two graphs It is the equivalent of performing A - B

func NewForwardGraph

func NewForwardGraph(appGroup *v1alpha1.ApplicationGroup) *Graph

NewForwardGraph takes in an ApplicationGroup and forms an abstracted DAG graph interface with app nodes and task nodes that can be passed into the template generation functions

func NewReverseGraph

func NewReverseGraph(appGroup *v1alpha1.ApplicationGroup) *Graph

NewReverseGraph creates a new reversed DAG based off the passed ApplicationGroup

func (*Graph) DeepCopy

func (g *Graph) DeepCopy() *Graph

func (*Graph) Reverse

func (g *Graph) Reverse() *Graph

Reverse method reverses the app node dependencies and the task node dependencies of the received graph

type TaskNode

type TaskNode struct {
	Name         string
	ChartName    string
	ChartVersion string
	Parent       string
	Release      *v1alpha1.Release
	Dependencies []string
	Executors    map[string]*ExecutorNode
}

func NewTaskNode

func NewTaskNode(application *v1alpha1.Application) *TaskNode

func (*TaskNode) DeepCopy

func (taskNode *TaskNode) DeepCopy() *TaskNode

Jump to

Keyboard shortcuts

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