rgraph

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package rgraph provides support generic orchestration routines for complex GCE resource graphs.

This package is highly experimental and exported symbols may change at any time. Do not use in production.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder builds resource Graphs.

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns a new Graph Builder.

func (*Builder) Add

func (g *Builder) Add(node rnode.Builder)

Add a node to the resource graph.

func (*Builder) All

func (g *Builder) All() []rnode.Builder

func (*Builder) Build

func (g *Builder) Build() (*Graph, error)

Build a Graph for planning from the nodes.

func (*Builder) Get

func (g *Builder) Get(id *cloud.ResourceID) rnode.Builder

Get the node named by id from the graph. Returns nil if the node does not exist.

func (*Builder) MustBuild

func (g *Builder) MustBuild() *Graph

MustBuild panics if the Graph cannot be built. This should ONLY be used in unit tests.

type Graph

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

Graph of cloud resources. The set of nodes in the graph cannot change -- use the Builder to manipulate the set of resource nodes.

func (*Graph) AddTombstone

func (g *Graph) AddTombstone(n rnode.Node) error

AddTombstone adds a node to represent the non-existence of a resource.

func (*Graph) All

func (g *Graph) All() []rnode.Node

All of the nodes in the Graph.

func (*Graph) ExplainPlan added in v1.26.0

func (g *Graph) ExplainPlan() string

ExplainPlan returns a human-readable string describing the plan attached to this Graph. The string will be rather verbose.

func (*Graph) Get

func (g *Graph) Get(id *cloud.ResourceID) rnode.Node

Get returns the Node named by id. Returns nil if the resource does not exist in the Graph.

func (*Graph) NewBuilderWithEmptyNodes

func (g *Graph) NewBuilderWithEmptyNodes() *Builder

NewBuilderWithEmptyNodes creates a graph Builder with the same set of nodes but with no resource values. This is used to create a Builder that can be sync'ed with the cloud.

Directories

Path Synopsis
Package exec implements execution of a graph of Action and Events.
Package exec implements execution of a graph of Action and Events.
all
testing
ez
Package ez is a utility to create complex resource graphs for testing from a concise description by use of naming conventions and default values.
Package ez is a utility to create complex resource graphs for testing from a concise description by use of naming conventions and default values.
workflow

Jump to

Keyboard shortcuts

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