control

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalNode

type ApprovalNode struct{}

ApprovalNode handles human-in-the-loop approvals.

func (*ApprovalNode) Execute

func (n *ApprovalNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute halts the workflow and creates an approval request.

type CollectNode

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

CollectNode (Fan-in) waits for all messages from a fan-out group before continuing.

func (*CollectNode) Execute

func (n *CollectNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute accumulates messages until all items of a fan-out group are received.

type ConditionNode

type ConditionNode struct{}

ConditionNode handles boolean branching.

func (*ConditionNode) Execute

func (n *ConditionNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute evaluates conditions and returns the branch name ("true" or "false").

type ForeachNode

type ForeachNode struct{}

ForeachNode implements execution-level fan-out.

func (*ForeachNode) Execute

func (n *ForeachNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute splits a single message into multiple messages based on an array field.

type RouterNode

type RouterNode struct{}

RouterNode handles multi-branch routing based on rules.

func (*RouterNode) Execute

func (n *RouterNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute evaluates rules and returns the label of the first matching rule.

type StatefulNode

type StatefulNode struct{}

StatefulNode handles stateful operations like counting or summing.

func (*StatefulNode) Execute

func (n *StatefulNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute performs the stateful operation and updates message data.

type SwitchNode

type SwitchNode struct{}

SwitchNode handles value-based branching.

func (*SwitchNode) Execute

func (n *SwitchNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute evaluates cases and returns the matching branch label.

type WaitNode

type WaitNode struct{}

WaitNode handles time-based pauses in workflows.

func (*WaitNode) Execute

func (n *WaitNode) Execute(ctx context.Context, nctx interfaces.NodeContext, workflowID string, node *storage.WorkflowNode, msg hermod.Message) ([]hermod.Message, string, error)

Execute waits for a configured duration before continuing.

Jump to

Keyboard shortcuts

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