apply

package
v0.0.0-...-215933a Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTreeContainsErrors = errors.New("apply had errors, check graph")

ErrTreeContainsErrors is a signal value to indicate errors in the graph

Functions

func Apply

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

Apply the actions in a Graph of resource.Tasks

func Pipeline

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

Pipeline generates a pipeline to evaluate a single graph node

func PlanAndApply

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

PlanAndApply plans and applies each node

func WithNotify

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

WithNotify calls PlanAndApply with a notifier

Types

type MkPipelineF

type MkPipelineF func(*graph.Graph, string) executor.Pipeline

MkPipelineF is a function to generate a pipeline given an id

type Result

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

	Ran       bool
	Plan      *plan.Result
	PostCheck resource.TaskStatus
}

Result of application

func (*Result) Changes

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

Changes returns the fields that changed

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 task of the embedded plan, if there is one

func (*Result) HasChanges

func (r *Result) HasChanges() bool

HasChanges indicates if this result ran

func (*Result) Messages

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

Messages returns any result status messages supplied by the task

Jump to

Keyboard shortcuts

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