Documentation
¶
Index ¶
- Variables
- func FlowStatusString(f FlowStatus) string
- func FlowStatusStringWithIcons(f FlowStatus) string
- func IsCancellationError(err error) bool
- func IsFlowStatusDone(f FlowStatus) bool
- type FlowEventChannels
- type FlowNodeEvent
- type FlowNodeEventTarget
- type FlowNodeLogPayload
- type FlowNodeStatus
- type FlowRunner
- type FlowStatus
- type IterationContext
- type IterationLabel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFlowRunnerNotImplemented = errors.New("flowrunner not implemented") ErrNodeNotFound = errors.New("next node not found") )
View Source
var ErrFlowCanceledByThrow = errors.New("flow canceled by throw")
ErrFlowCanceledByThrow marks an intentional cancellation triggered by a node (e.g., via a user throw). When a loop node propagates this error, the runner should mark the loop as CANCELED, not FAILURE.
Functions ¶
func FlowStatusString ¶
func FlowStatusString(f FlowStatus) string
func FlowStatusStringWithIcons ¶
func FlowStatusStringWithIcons(f FlowStatus) string
func IsCancellationError ¶
IsCancellationError returns true if the error represents a cancellation (explicit throw or context cancellation).
func IsFlowStatusDone ¶
func IsFlowStatusDone(f FlowStatus) bool
Types ¶
type FlowEventChannels ¶
type FlowEventChannels struct {
NodeStates chan FlowNodeStatus
NodeLogs chan FlowNodeLogPayload
FlowStatus chan FlowStatus
}
func LegacyFlowEventChannels ¶
func LegacyFlowEventChannels(nodeStates chan FlowNodeStatus, flowStatus chan FlowStatus) FlowEventChannels
func (FlowEventChannels) HasLogChannel ¶
func (c FlowEventChannels) HasLogChannel() bool
type FlowNodeEvent ¶
type FlowNodeEvent struct {
Status FlowNodeStatus
Targets FlowNodeEventTarget
LogPayload *FlowNodeLogPayload
}
func (FlowNodeEvent) ShouldSend ¶
func (e FlowNodeEvent) ShouldSend(target FlowNodeEventTarget) bool
type FlowNodeEventTarget ¶
type FlowNodeEventTarget uint8
const ( FlowNodeEventTargetState FlowNodeEventTarget = 1 << iota FlowNodeEventTargetLog )
type FlowNodeLogPayload ¶
type FlowNodeStatus ¶
type FlowNodeStatus struct {
ExecutionID idwrap.IDWrap
NodeID idwrap.IDWrap
Name string
State mflow.NodeState
OutputData any
InputData any // Data that was read by this node during execution
RunDuration time.Duration
Error error
IterationContext *IterationContext `json:"iteration_context,omitempty"`
IterationEvent bool `json:"iteration_event,omitempty"`
IterationIndex int `json:"iteration_index,omitempty"`
LoopNodeID idwrap.IDWrap `json:"loop_node_id,omitempty"`
AuxiliaryID *idwrap.IDWrap
}
func NewFlowNodeStatus ¶
type FlowRunner ¶
type FlowStatus ¶
type FlowStatus int8
const ( FlowStatusStarting FlowStatus = iota FlowStatusRunning FlowStatusSuccess FlowStatusFailed FlowStatusTimeout )
type IterationContext ¶
type IterationContext struct {
IterationPath []int `json:"iteration_path"` // [1, 2, 3] for nested loops
ExecutionIndex int `json:"execution_index"` // Current execution within current loop
ParentNodes []idwrap.IDWrap `json:"parent_nodes,omitempty"` // Parent loop node IDs for hierarchical naming
Labels []IterationLabel `json:"labels,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.