Documentation ¶
Overview ¶
Package builder implements richer support for working with operation phases
Index ¶
- func Resolve(phases []*Phase, emptyPlan storage.OperationPlan) *storage.OperationPlan
- func ResolveInline(root *Phase, emptyPlan storage.OperationPlan) *storage.OperationPlan
- type Phase
- func (p *Phase) AddParallel(subs ...*Phase)
- func (p *Phase) AddParallelRaw(subs ...storage.OperationPhase)
- func (p *Phase) AddSequential(subs ...*Phase)
- func (p *Phase) AddSequentialRaw(subs ...storage.OperationPhase)
- func (p *Phase) AddWithDependency(dep *Phase, subs ...*Phase)
- func (p *Phase) HasSubphases() bool
- func (p *Phase) Require(reqs ...*Phase) *Phase
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 ¶
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 ¶
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 ¶
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 ¶
AddWithDependency sets phase as explicit dependency on subs
func (*Phase) HasSubphases ¶
HasSubphases returns true if this phase has sub-phases