plan

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTreeContainsErrors = errors.New("plan has errors, check graph")

ErrTreeContainsErrors is a signal value to indicate errors in the graph

Functions

func Pipeline

func Pipeline(ctx context.Context, g *graph.Graph, id string, factory *render.Factory) executor.Pipeline

Pipeline generates a pipeline to evaluate a single graph node

func Plan

func Plan(ctx context.Context, in *graph.Graph) (*graph.Graph, error)

Plan the execution of a Graph of resource.Tasks

func WithNotify

func WithNotify(ctx context.Context, in *graph.Graph, notify *graph.Notifier) (*graph.Graph, error)

WithNotify is plan, but with a notification feature

Types

type Result

type Result struct {
	Task   resource.Task
	Status resource.TaskStatus
	Err    error
}

Result is the result of planning execution

func (*Result) Changes

func (r *Result) Changes() map[string]resource.Diff

Changes returns the fields that will change based on this result

func (*Result) Error

func (r *Result) Error() error

Error returns the error assigned to this Result, if any

func (*Result) GetStatus

func (r *Result) GetStatus() resource.TaskStatus

GetStatus returns the current task status

func (*Result) GetTask

func (r *Result) GetTask() (resource.Task, bool)

GetTask returns the embedded task

func (*Result) HasChanges

func (r *Result) HasChanges() bool

HasChanges indicates if this result will change

func (*Result) Messages

func (r *Result) Messages() []string

Messages returns any message values supplied by the task

func (*Result) Warning

func (r *Result) Warning() string

Warning returns the warning assigned to this Result, if any

Jump to

Keyboard shortcuts

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