builder

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package builder implements richer support for working with operation phases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(phases []*Phase, emptyPlan storage.OperationPlan) *storage.OperationPlan

Resolve returns a new plan with specified phases after resolving phase dependencies and rendering phase IDs as absolute.

func ResolveInline

func ResolveInline(root *Phase, emptyPlan storage.OperationPlan) *storage.OperationPlan

ResolveInline returns a new plan with phases from the specified root after resolving phase dependencies and rendering phase IDs as absolute.

Types

type Phase

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

Phase wraps an operation phase and adds builder-specific extensions

func DependencyForServer

func DependencyForServer(phase *Phase, server storage.Server) *Phase

DependencyForServer looks up a dependency in the list of sub-phases of the given phase that references the specified server and returns a reference to it. If no server has been found, it returns the reference to the phase itself

func NewPhase

func NewPhase(phase storage.OperationPhase) *Phase

NewPhase returns a new phase using the specified phase as a template

func (*Phase) AddParallel

func (p *Phase) AddParallel(subs ...*Phase)

AddParallel will append sub-phases which depend on parent only

func (*Phase) AddParallelRaw

func (p *Phase) AddParallelRaw(subs ...storage.OperationPhase)

AddParallelRaw will append sub-phases which depend on parent only

func (*Phase) AddSequential

func (p *Phase) AddSequential(subs ...*Phase)

AddSequential will append sub-phases which depend one upon another

func (*Phase) AddSequentialRaw

func (p *Phase) AddSequentialRaw(subs ...storage.OperationPhase)

AddSequentialRaw will append sub-phases which depend one upon another

func (*Phase) AddWithDependency

func (p *Phase) AddWithDependency(dep *Phase, subs ...*Phase)

AddWithDependency sets phase as explicit dependency on subs

func (*Phase) HasSubphases

func (p *Phase) HasSubphases() bool

HasSubphases returns true if this phase has sub-phases

func (*Phase) Require

func (p *Phase) Require(reqs ...*Phase) *Phase

Require adds the specified phases reqs as requirements for this phase

Jump to

Keyboard shortcuts

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