flow

package
v0.1.0-dev.20260216095753 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *execution.ActionRegistry)

Register registers all flow actions into the given registry.

Types

type Choose

type Choose struct{}

Choose is an OR-selector flow action. It evaluates alternatives (multiple predecessors) and selects one based on criteria. Only the selected branch is executed; unchosen branches are skipped.

func (*Choose) Do

Do evaluates alternatives and selects one. The selection criteria is stored in the "criteria" slot.

func (*Choose) Name

func (a *Choose) Name() string

Name returns the dotted action name.

func (*Choose) Undo

func (a *Choose) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

Undo is a no-op for choose — selection is not reversible.

type Elevate

type Elevate struct{}

Elevate is a privilege transition flow action. It marks the boundary between unprivileged and privileged execution as an explicit graph node. In dry-run mode it reports "root required here"; the receipt records when privilege was acquired and released.

func (*Elevate) Do

Do acquires elevated privilege. Stub implementation — full sudo/privilege integration is a separate plan.

func (*Elevate) Name

func (a *Elevate) Name() string

Name returns the dotted action name.

func (*Elevate) Undo

func (a *Elevate) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

Undo releases elevated privilege.

type Gather

type Gather struct{}

Gather is an AND-join flow action. It waits for all predecessors to complete before proceeding. Equivalent to Promise.all() — every input must succeed for the gather node to succeed.

func (*Gather) Do

Do verifies that all predecessors completed successfully.

func (*Gather) Name

func (a *Gather) Name() string

Name returns the dotted action name.

func (*Gather) Undo

func (a *Gather) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

Undo is a no-op for gather — join points are not reversible.

Jump to

Keyboard shortcuts

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