Versions in this module Expand all Collapse all v1 v1.0.1 Jun 2, 2026 v1.0.0 May 23, 2026 Changes in this version + var ErrLoopCancelled = errors.New("loop cancelled") + var ErrLoopTimeout = errors.New("loop timeout") + var ErrWorkflowClosed = errors.New("workflow has been closed and cannot be used") + var ErrWorkflowResetRunning = errors.New("cannot reset a running workflow") + var ErrWorkflowRunning = errors.New("workflow is already running") + var ErrWorkflowSubmitNodeToPool = errors.New("failed to submit node to pool") + type DataSlot struct + func NewDataSlot() *DataSlot + func (s *DataSlot) Done() <-chan struct{} + func (s *DataSlot) Get(ctx context.Context) (any, error) + func (s *DataSlot) IsReady() bool + func (s *DataSlot) Set(value any) + func (s *DataSlot) SetOnce(value any) + func (s *DataSlot) SetOrUpdate(value any) + func (s *DataSlot) TryGet() (any, bool) + type FlowContext struct + func NewFlowContext(ctx context.Context) *FlowContext + func (c *FlowContext) Cancel(err error) + func (c *FlowContext) Done() <-chan struct{} + func (c *FlowContext) Err() error + func (c *FlowContext) Get(key string) (any, error) + func (c *FlowContext) GetContext() *context.Context + func (c *FlowContext) GetError() error + func (c *FlowContext) IsReady(key string) bool + func (c *FlowContext) Set(key string, value any) + func (c *FlowContext) SetError(err error) error + func (c *FlowContext) SetOnce(key string, value any) + func (c *FlowContext) SetOrUpdate(key string, value any) + func (c *FlowContext) TryGet(key string) (any, bool) + func (c *FlowContext) Wait(key string) (any, error) + func (c *FlowContext) WaitAll(keys ...string) (map[string]any, error) + func (c *FlowContext) WaitForAny(keys ...string) (string, any, error) + type LoopResult struct + Iterations int + Message string + Status LoopStatus + func NewLoopCancelledResult(iterations int, err error) *LoopResult + func NewLoopCompletedResult(iterations int) *LoopResult + func NewLoopMaxIterationsResult(maxIterations, actualIterations int) *LoopResult + func NewLoopResult(status LoopStatus, iterations int, message string) *LoopResult + func NewLoopTimeoutResult(iterations int) *LoopResult + func (r *LoopResult) IsError() bool + func (r *LoopResult) IsSuccess() bool + func (r *LoopResult) ToMap() map[string]any + type LoopStatus string + const LoopStatusCancelled + const LoopStatusCompleted + const LoopStatusConditionFailed + const LoopStatusMaxIterations + const LoopStatusTimeout + func (s LoopStatus) String() string + type SafeMap struct + func (s *SafeMap[K, V]) Clear() + func (s *SafeMap[K, V]) Delete(key K) + func (s *SafeMap[K, V]) Exist(key K) bool + func (s *SafeMap[K, V]) Get(key K) (V, bool) + func (s *SafeMap[K, V]) GetOrSet(key K, createFn func() V) V + func (s *SafeMap[K, V]) MustGet(key K) V + func (s *SafeMap[K, V]) Range(fn func(key K, value V) bool) + func (s *SafeMap[K, V]) Set(key K, value V)