execute

package
v0.0.0-...-b94449b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package execute contains the logic to execute plans concurrently, taking into account dependencies and phases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationResult

type OperationResult struct {
	Name      string `json:"name"`
	Dirty     bool   `json:"dirty"`
	Changed   bool   `json:"changed"`
	PrevEmpty bool   `json:"prev_empty"`
	Executed  bool   `json:"executed"`
	// contains filtered or unexported fields
}

type Opts

type Opts struct {
	Dryrun      bool
	DirRoot     string
	StateDir    string
	Concurrency int
}

type PlanResult

type PlanResult struct {
	Name       string             `json:"name"`
	Operations []*OperationResult `json:"operations"`
	Changed    bool               `json:"changed"`
	Error      error              `json:"error"`
	Plan       *compiler.Plan
}

type Result

type Result struct {
	Plans []*PlanResult `json:"plans"`
}

func Execute

func Execute(octx operator.Context, plan *compiler.Plan, opts Opts) (*Result, error)

Execute runs a manifest concurrently. Each "plan" or "dependency" operation runs in a concurrent pool, taking dependencies into account. Operations run serially per-plan.

func (Result) Changed

func (r Result) Changed() bool

func (Result) Err

func (r Result) Err() error

func (Result) TextSummary

func (r Result) TextSummary(w io.Writer) error

Jump to

Keyboard shortcuts

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